Moved CUtils::Trim() into CString class

git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@247 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
prozacx
2005-05-08 04:30:14 +00:00
parent 078bbcf019
commit 511832a8d6
11 changed files with 31 additions and 31 deletions

View File

@@ -123,7 +123,7 @@ bool CString::Trim(const CString& s) {
bool CString::LeftTrim(const CString& s) {
bool bRet = false;
while ((Left(1) == " ") || (Left(1) == "\t") || (Left(1) == "\r") || (Left(1) == "\n")) {
while (s.find(Left(1)) != CString::npos) {
LeftChomp();
bRet = true;
}
@@ -134,7 +134,7 @@ bool CString::LeftTrim(const CString& s) {
bool CString::RightTrim(const CString& s) {
bool bRet = false;
while ((Right(1) == " ") || (Right(1) == "\t") || (Right(1) == "\r") || (Right(1) == "\n")) {
while (s.find(Right(1)) != CString::npos) {
RightChomp();
bRet = true;
}