| 114 | } |
| 115 | |
| 116 | bool MatchIgnoreCase(const char* token, const char* expect, size_t len) { |
| 117 | for (size_t i = 0; i < len; ++i) { |
| 118 | if (tolower(token[i]) != tolower(expect[i])) { |
| 119 | return false; |
| 120 | } |
| 121 | } |
| 122 | |
| 123 | return true; |
| 124 | } |
| 125 | |
| 126 | // Helper class to tokenize a hex stream |
| 127 | class HexTokenizer { |