(int c)
| 20 | |
| 21 | // If |c| is an ASCII hex digit, returns its value, otherwise -1. |
| 22 | static int unhex(int c) { |
| 23 | if ('0' <= c && c <= '9') { |
| 24 | return c - '0'; |
| 25 | } |
| 26 | if ('a' <= c && c <= 'f') { |
| 27 | return c - 'a' + 10; |
| 28 | } |
| 29 | if ('A' <= c && c <= 'F') { |
| 30 | return c - 'A' + 10; |
| 31 | } |
| 32 | return -1; |
| 33 | } |
| 34 | |
| 35 | private static final String METACHARACTERS = "\\.+*?()|[]{}^$"; |
| 36 |
no outgoing calls