mirror of
https://github.com/znc/znc.git
synced 2026-08-07 09:22:55 +02:00
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:
+5
-2
@@ -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());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user