Index: Source/platform/ParsingUtilities.h |
diff --git a/Source/platform/ParsingUtilities.h b/Source/platform/ParsingUtilities.h |
index 882b800bf398e9e951aa39e1ff22bf40c48243ad..3ba75629a2d4d8437f62e4649c7c8d975117eeea 100644 |
--- a/Source/platform/ParsingUtilities.h |
+++ b/Source/platform/ParsingUtilities.h |
@@ -51,7 +51,24 @@ bool skipExactly(const CharType*& position, const CharType* end) |
return false; |
} |
-template<typename CharType> |
+template <typename CharType> |
+bool skipToken(const CharType*& position, const CharType* end, const char* token) |
+{ |
+ const CharType* current = position; |
+ while (current < end && *token) { |
+ if (*current != *token) |
+ return false; |
+ ++current; |
+ ++token; |
+ } |
+ if (*token) |
+ return false; |
+ |
+ position = current; |
+ return true; |
+} |
+ |
+template <typename CharType> |
void skipUntil(const CharType*& position, const CharType* end, CharType delimiter) |
{ |
while (position < end && *position != delimiter) |