Added ToShort() and ToUShort()

git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@380 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
prozacx
2005-06-06 03:51:36 +00:00
parent da0846d8a6
commit abfa561648
2 changed files with 4 additions and 0 deletions
+2
View File
@@ -192,6 +192,8 @@ CString CString::ToKBytes(double d) {
return szRet;
}
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); }
int CString::ToInt() const { return strtoul(this->c_str(), (char**) NULL, 10); }
unsigned long long CString::ToULongLong() const { return strtoull( c_str(), NULL, 10); }