Index: Source/platform/ParsingUtilities.h |
diff --git a/Source/platform/ParsingUtilities.h b/Source/platform/ParsingUtilities.h |
index 882b800bf398e9e951aa39e1ff22bf40c48243ad..aff22b895a5003608fff9f78383066142a5a5c66 100644 |
--- a/Source/platform/ParsingUtilities.h |
+++ b/Source/platform/ParsingUtilities.h |
@@ -51,7 +51,23 @@ 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++) |
jww
2014/10/15 23:26:04
I find this inline post-increment extremely confus
Mike West
2014/10/16 06:17:22
Done.
|
+ return false; |
+ ++current; |
+ } |
+ 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) |