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:
prozacx
2005-05-08 07:50:20 +00:00
parent fd231e6b3a
commit 1c5981ee6d
2 changed files with 24 additions and 0 deletions
+22
View File
@@ -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();