mirror of
https://github.com/znc/znc.git
synced 2026-07-30 13:33:42 +02:00
CString::Split(): Skip empty tokens at the beginning for bAllowEmpty = false
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1041 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
@@ -577,6 +577,12 @@ unsigned int CString::Split(const CString& sDelim, VCString& vsRet, bool bAllowE
|
||||
unsigned int uRightLen = sRight.length();
|
||||
const char* p = c_str();
|
||||
|
||||
if (!bAllowEmpty) {
|
||||
while (strncasecmp(p, sDelim.c_str(), uDelimLen) == 0) {
|
||||
p += uDelimLen;
|
||||
}
|
||||
}
|
||||
|
||||
while (*p) {
|
||||
if (uLeftLen && uRightLen && !bInside && strncasecmp(p, sLeft.c_str(), uLeftLen) == 0) {
|
||||
p += uLeftLen;
|
||||
|
||||
Reference in New Issue
Block a user