Added ToUInt() and ToInt()

git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@312 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
prozacx
2005-05-16 01:27:56 +00:00
parent ac19abcfa6
commit 30c3bff700
2 changed files with 7 additions and 4 deletions

View File

@@ -175,9 +175,11 @@ CString CString::ToKBytes(double d) {
return szRet;
}
unsigned long long CString::ToULongLong() const { return( strtoull( c_str(), NULL, 10 ) ); }
long long CString::ToLongLong() const { return( strtoll( c_str(), NULL, 10 ) ); }
double CString::ToDouble() const { return( strtod( c_str(), NULL ) ); }
unsigned int CString::ToUInt() const { return strtoul(this->c_str(), (char**) NULL, 10); }
int CString::ToInt() const { return strtoul(this->c_str(), (char**) NULL, 10); }
unsigned long long CString::ToULongLong() const { return strtoull( c_str(), NULL, 10); }
long long CString::ToLongLong() const { return strtoll(c_str(), NULL, 10); }
double CString::ToDouble() const { return strtod(c_str(), NULL); }
bool CString::Trim(const CString& s) {