int compare_no_case(string const & s, string const & s2, unsigned int len)
{
-//#warning verify this func please
string::const_iterator p = s.begin();
string::const_iterator p2 = s2.begin();
unsigned int i = 0;
string const lowercase(string const & a)
{
string tmp(a);
-//#ifdef __GLIBCPP__
+#if 1
string::iterator result = tmp.begin();
string::iterator end = tmp.end();
for (string::iterator first = tmp.begin();
first != end; ++first, ++result) {
*result = lowercase(*first);
}
-//#else
-// transform(tmp.begin(), tmp.end(), tmp.begin(), tolower);
-//#endif
+#else
+ // We want to use this one. (Lgb)
+ transform(tmp.begin(), tmp.end(), tmp.begin(), tolower);
+#endif
return tmp;
}
string const uppercase(string const & a)
{
string tmp(a);
-//#ifdef __GLIBCPP__
+#if 1
string::iterator result = tmp.begin();
string::iterator end = tmp.end();
for (string::iterator first = tmp.begin();
first != end; ++first, ++result) {
*result = uppercase(*first);
}
-//#else
-// transform(tmp.begin(), tmp.end(), tmp.begin(), toupper);
-//#endif
+#else
+ // We want to use this one. (Lgb)
+ transform(tmp.begin(), tmp.end(), tmp.begin(), toupper);
+#endif
return tmp;
}
string tmp(a, alen - suflen);
return ::strncmp(tmp.c_str(), suf.c_str(), suflen) == 0;
#else
- return a.compare(alen - suflen, suflen, suf);
+ return a.compare(alen - suflen, suflen, suf) == 0;
#endif
}
}