Added length argument to CString::StrCmp() like in CString::CaseCmp()

git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1231 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
kroimon
2008-09-30 12:57:10 +00:00
parent 273d72c605
commit 195681d7d7
2 changed files with 7 additions and 4 deletions
+5 -2
View File
@@ -172,14 +172,17 @@ inline unsigned char* CString::strnchr(const unsigned char* src, unsigned char c
return NULL;
}
int CString::CaseCmp(const CString& s, u_long uLen) const {
int CString::CaseCmp(const CString& s, unsigned long uLen) const {
if (uLen != CString::npos) {
return strncasecmp(c_str(), s.c_str(), uLen);
}
return strcasecmp(c_str(), s.c_str());
}
int CString::StrCmp(const CString& s) const {
int CString::StrCmp(const CString& s, unsigned long uLen) const {
if (uLen != CString::npos) {
return strncmp(c_str(), s.c_str(), uLen);
}
return strcmp(c_str(), s.c_str());
}