Returns the escaped character if there was a preceding backslash. Returns 'c' if there is no known escape sequence backslash-c
(char c)
| 474 | /** Returns the escaped character if there was a preceding backslash. |
| 475 | * Returns 'c' if there is no known escape sequence backslash-c */ |
| 476 | private static char withBackslash(char c) { |
| 477 | switch (c) { |
| 478 | case 'b': return '\b'; |
| 479 | case 't': return '\t'; |
| 480 | case 'f': return '\f'; |
| 481 | case 'r': return '\r'; |
| 482 | case 'n': return '\n'; |
| 483 | default: return c; |
| 484 | } |
| 485 | } |
| 486 | |
| 487 | /** Returns the checksum of a string or file, or "0" if no success. |
| 488 | The 'method' argument must be "MD5" or "SHA-256". |