Moved CUtils::Ellipsize() into CString class

git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@245 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
prozacx
2005-05-07 09:43:26 +00:00
parent 24950d24e4
commit 11ae1b690f
4 changed files with 6 additions and 24 deletions
-20
View File
@@ -430,26 +430,6 @@ string& CUtils::RightChomp(string& s, unsigned int uLen) {
return s;
}
string CUtils::Ellipsize(const string& s, unsigned int uLen) {
if (uLen >= s.size()) {
return s;
}
string sRet;
if (uLen < 4) {
for (unsigned int a = 0; a < uLen; a++) {
sRet += ".";
}
return sRet;
}
sRet = s.substr(0, uLen -3) + "...";
return sRet;
}
bool CUtils::wildcmp(const string& sWild, const string& sString) {
// Written by Jack Handy - jakkhandy@hotmail.com
const char *wild = sWild.c_str(), *string = sString.c_str();