1
0
Fork 0

Added StrToLower(), URLDecode() and ReplaceAllCharOccurrences().

This commit is contained in:
madmaxoft 2013-09-30 19:59:40 +02:00
parent bb0fb0aa30
commit e31343297e
2 changed files with 20 additions and 0 deletions

View File

@ -196,6 +196,23 @@ AString & StrToUpper(AString & s)
AString & StrToLower(AString & s)
{
AString::iterator i = s.begin();
AString::iterator end = s.end();
while (i != end)
{
*i = (char)tolower(*i);
++i;
}
return s;
}
int NoCaseCompare(const AString & s1, const AString & s2)
{
#ifdef _MSC_VER

View File

@ -45,6 +45,9 @@ extern AString TrimString(const AString & str); // tolua_export
/// In-place string conversion to uppercase; returns the same string
extern AString & StrToUpper(AString & s);
/// In-place string conversion to lowercase; returns the same string
extern AString & StrToLower(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