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:
psychon
2008-05-08 13:23:47 +00:00
parent 5665fd872d
commit 005af9c2c3
+6
View File
@@ -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;