| 382 | |
| 383 | template <typename Char> |
| 384 | inline Char HexDigitToInt(Char c) { |
| 385 | DCHECK(IsHexDigit(c)); |
| 386 | if (c >= '0' && c <= '9') |
| 387 | return c - '0'; |
| 388 | if (c >= 'A' && c <= 'F') |
| 389 | return c - 'A' + 10; |
| 390 | if (c >= 'a' && c <= 'f') |
| 391 | return c - 'a' + 10; |
| 392 | return 0; |
| 393 | } |
| 394 | |
| 395 | // Returns true if it's a whitespace character. |
| 396 | inline bool IsWhitespace(wchar_t c) { |