This commit is contained in:
Overhaul
2007-06-29 10:40:05 +00:00
parent dc441a425d
commit e6024e5151
46 changed files with 4912 additions and 46 deletions
+15
View File
@@ -12,6 +12,7 @@ bool TStringiLess::operator() (std::string const& s1, std::string const& s2) con
// An MSVC compliance issue...
//using std::toupper;
#if 0
std::string::const_iterator p1 = s1.begin();
std::string::const_iterator p2 = s2.begin();
@@ -24,4 +25,18 @@ bool TStringiLess::operator() (std::string const& s1, std::string const& s2) con
if (p2 == s2.end()) return false;
return toupper(*p1) < toupper(*p2);
#else
const char *p1 = s1.c_str();
const char *p2 = s2.c_str();
while (*p1 && *p2 && toupper(*p1) == toupper(*p2)) {
++p1;
++p2;
}
if (!*p1) return *p2;
if (!*p2) return false;
return toupper(*p1) < toupper(*p2);
#endif
}