Chromium Code Reviews| Index: Source/platform/ParsingUtilities.h |
| diff --git a/Source/platform/ParsingUtilities.h b/Source/platform/ParsingUtilities.h |
| index 3ba75629a2d4d8437f62e4649c7c8d975117eeea..3ea8df0e3e05e3978073746374730cb7fefef6e1 100644 |
| --- a/Source/platform/ParsingUtilities.h |
| +++ b/Source/platform/ParsingUtilities.h |
| @@ -76,6 +76,13 @@ void skipUntil(const CharType*& position, const CharType* end, CharType delimite |
| } |
| template<typename CharType, bool characterPredicate(CharType)> |
| +void skipUntil(const CharType*& position, const CharType* end, CharType delimiter) |
|
Mike West
2015/02/02 13:14:54
Hrm. this is somewhat strange. Why can't you fold
|
| +{ |
| + while (position < end && !characterPredicate(*position) && *position != delimiter) |
| + ++position; |
| +} |
| + |
| +template<typename CharType, bool characterPredicate(CharType)> |
| void skipUntil(const CharType*& position, const CharType* end) |
| { |
| while (position < end && !characterPredicate(*position)) |