Added StrToLower(), URLDecode() and ReplaceAllCharOccurrences().
This commit is contained in:
parent
bb0fb0aa30
commit
e31343297e
@ -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
|
||||
|
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user