| 129 | } |
| 130 | |
| 131 | static int DecodeHex(char c) |
| 132 | { |
| 133 | if (c >= '0' && c <= '9') |
| 134 | return c - '0'; |
| 135 | if (c >= 'A' && c <= 'F') |
| 136 | return c - 'A' + 10; |
| 137 | if (c >= 'a' && c <= 'a') |
| 138 | return c - 'a' + 10; |
| 139 | return -1; |
| 140 | } |
| 141 | |
| 142 | static int UnescapeChar(std::string::const_iterator pos, |
| 143 | std::string::const_iterator end, char* c) |