changed getTokenExclude method to allow escaped characters.

This commit is contained in:
Brad Arant committed 2024-11-14 09:44:12 -08:00
1 parent c70f135710
commit 8f5dd52c6a
2 files changed
+13 -2

No files matched your search

+9 -2
View File
@@ -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);
}