mirror of
https://github.com/znc/znc.git
synced 2026-08-07 17:33:34 +02:00
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user