changed getTokenExclude method to allow escaped characters.
This commit is contained in:
1 parent
c70f135710
commit
8f5dd52c6a
2 files changed
+13
-2
No files matched your search
+9
-2
@@ -291,9 +291,16 @@ namespace coreutils {
|
||||
}
|
||||
|
||||
ZString ZString::getTokenExclude(const char *exclude) {
|
||||
char previous = 0;
|
||||
char *start = cursor;
|
||||
while ((cursor <= (data + length)) && !isCharacter(*cursor, exclude))
|
||||
++cursor;
|
||||
do {
|
||||
while ((cursor <= (data + length)) && !isCharacter(*cursor, exclude)) {
|
||||
previous = *cursor;
|
||||
++cursor;
|
||||
}
|
||||
++cursor;
|
||||
} while(previous == '\\');
|
||||
--cursor;
|
||||
return ZString(start, cursor - start);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user