Moved CUtils::Token() into CString class

git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@244 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
prozacx
2005-05-07 09:18:56 +00:00
parent 5f61128b18
commit 24950d24e4
11 changed files with 129 additions and 147 deletions
-23
View File
@@ -430,29 +430,6 @@ string& CUtils::RightChomp(string& s, unsigned int uLen) {
return s;
}
string CUtils::Token(const string& s, unsigned int uPos, bool bRest, char cSep) {
string sRet;
const char* p = s.c_str();
while (*p) {
if (uPos) {
if (*p == cSep) {
uPos--;
}
} else {
if ((*p == cSep) && (!bRest)) {
return sRet;
}
sRet += *p;
}
p++;
}
return sRet;
}
string CUtils::Ellipsize(const string& s, unsigned int uLen) {
if (uLen >= s.size()) {
return s;