Merge branch 'master' into GlobalFixes
This commit is contained in:
commit
65720c8db1
@ -230,6 +230,21 @@ AString & StrToLower(AString & s)
|
||||
|
||||
|
||||
|
||||
AString StrToLower(const AString & s)
|
||||
{
|
||||
AString res;
|
||||
res.resize(s.size());
|
||||
for (AString::iterator itr = res.begin(), end = res.end(); itr != end; ++itr)
|
||||
{
|
||||
*itr = (char)tolower(*itr);
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
int NoCaseCompare(const AString & s1, const AString & s2)
|
||||
{
|
||||
#ifdef _MSC_VER
|
||||
|
@ -48,6 +48,9 @@ extern AString & StrToUpper(AString & s);
|
||||
/// In-place string conversion to lowercase; returns the same string
|
||||
extern AString & StrToLower(AString & s);
|
||||
|
||||
/** Returns a lower-cased copy of the string */
|
||||
extern AString StrToLower(const AString & s);
|
||||
|
||||
/// Case-insensitive string comparison; returns 0 if the strings are the same
|
||||
extern int NoCaseCompare(const AString & s1, const AString & s2); // tolua_export
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user