diff options
Diffstat (limited to 'third_party/chromium/base/strings/string_util.h')
-rw-r--r-- | third_party/chromium/base/strings/string_util.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/third_party/chromium/base/strings/string_util.h b/third_party/chromium/base/strings/string_util.h index f505bb6..6b87324 100644 --- a/third_party/chromium/base/strings/string_util.h +++ b/third_party/chromium/base/strings/string_util.h @@ -173,6 +173,13 @@ TrimPositions TrimWhitespaceASCII(const std::string& input, bool IsStringUTF8(const StringPiece& str); bool IsStringASCII(const StringPiece& str); +template <typename Char> +inline bool IsHexDigit(Char c) { + return (c >= '0' && c <= '9') || + (c >= 'A' && c <= 'F') || + (c >= 'a' && c <= 'f'); +} + // Reserves enough memory in |str| to accommodate |length_with_null| characters, // sets the size of |str| to |length_with_null - 1| characters, and returns a // pointer to the underlying contiguous array of characters. This is typically |