mirror of
https://github.com/znc/znc.git
synced 2026-08-08 09:52:55 +02:00
added optional length to CaseCmp
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@978 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
+4
-1
@@ -172,7 +172,10 @@ inline unsigned char* CString::strnchr(const unsigned char* src, unsigned char c
|
||||
return NULL;
|
||||
}
|
||||
|
||||
int CString::CaseCmp(const CString& s) const {
|
||||
int CString::CaseCmp(const CString& s, u_long uLen ) const {
|
||||
if( uLen != CString::npos ) {
|
||||
return strncasecmp(c_str(), s.c_str(), uLen);
|
||||
}
|
||||
return strcasecmp(c_str(), s.c_str());
|
||||
}
|
||||
|
||||
|
||||
@@ -79,7 +79,7 @@ public:
|
||||
virtual ~CString() {}
|
||||
|
||||
inline unsigned char* strnchr(const unsigned char* src, unsigned char c, unsigned int iMaxBytes, unsigned char* pFill = NULL, unsigned int* piCount = NULL) const;
|
||||
int CaseCmp(const CString& s) const;
|
||||
int CaseCmp(const CString& s, u_long uLen = CString::npos ) const;
|
||||
int StrCmp(const CString& s) const;
|
||||
static bool WildCmp(const CString& sWild, const CString& sString);
|
||||
bool WildCmp(const CString& sWild) const;
|
||||
|
||||
Reference in New Issue
Block a user