Which option is faster...

jicman cabrera__SP at M__wrc.xerox.com
Mon Aug 5 06:59:23 PDT 2013


Greetings!

I have this code,

foreach (...)
{

   if (std.string.tolower(fext[0]) == "doc" ||
     std.string.tolower(fext[0]) == "docx" ||
     std.string.tolower(fext[0]) == "xls" ||
     std.string.tolower(fext[0]) == "xlsx" ||
     std.string.tolower(fext[0]) == "ppt" ||
     std.string.tolower(fext[0]) == "pptx")
    continue;
}

foreach (...)
{
   if (std.string.tolower(fext[0]) == "doc")
     continue;
   if (std.string.tolower(fext[0]) == "docx")
     continue;
   if (std.string.tolower(fext[0]) == "xls")
     continue;
   if (std.string.tolower(fext[0]) == "xlsx")
     continue;
   if (std.string.tolower(fext[0]) == "ppt")
     continue;
   if (std.string.tolower(fext[0]) == "pptx")
    continue;
   ...
   ...
}

thanks.

josé


More information about the Digitalmars-d-learn mailing list