mirror of
https://github.com/znc/znc.git
synced 2026-08-07 01:13:25 +02:00
Added AsUpper() and AsLower()
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@250 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
+22
@@ -35,6 +35,28 @@ CString& CString::MakeLower() {
|
||||
return *this;
|
||||
}
|
||||
|
||||
CString CString::AsUpper() const {
|
||||
CString sRet = *this;
|
||||
|
||||
for (unsigned int a = 0; a < length(); a++) {
|
||||
char& c = sRet[a];
|
||||
c = toupper(c);
|
||||
}
|
||||
|
||||
return sRet;
|
||||
}
|
||||
|
||||
CString CString::AsLower() const {
|
||||
CString sRet = *this;
|
||||
|
||||
for (unsigned int a = 0; a < length(); a++) {
|
||||
char& c = sRet[a];
|
||||
c = tolower(c);
|
||||
}
|
||||
|
||||
return sRet;
|
||||
}
|
||||
|
||||
CString CString::Token(unsigned int uPos, bool bRest, char cSep) const {
|
||||
string sRet;
|
||||
const char* p = c_str();
|
||||
|
||||
Reference in New Issue
Block a user