mirror of
https://github.com/znc/znc.git
synced 2026-03-28 17:42:41 +01:00
Added ToBool()
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@409 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
@@ -256,7 +256,7 @@ VCString CString::Split(const CString& sDelim, bool bAllowEmpty) const {
|
||||
}
|
||||
|
||||
unsigned int CString::Split(const CString& sDelim, VCString& vsRet, bool bAllowEmpty) const {
|
||||
vsRet.empty();
|
||||
vsRet.clear();
|
||||
CString sTmp = *this;
|
||||
|
||||
while (sTmp.size()) {
|
||||
@@ -346,6 +346,7 @@ CString CString::ToKBytes(double d) {
|
||||
return szRet;
|
||||
}
|
||||
|
||||
bool CString::ToBool() const { return (!Trim_n().Trim_n("0").empty() && CaseCmp("false") != 0); }
|
||||
short CString::ToShort() const { return strtoul(this->c_str(), (char**) NULL, 10); }
|
||||
unsigned short CString::ToUShort() const { return strtoul(this->c_str(), (char**) NULL, 10); }
|
||||
unsigned int CString::ToUInt() const { return strtoul(this->c_str(), (char**) NULL, 10); }
|
||||
|
||||
Reference in New Issue
Block a user