Unescape a PHP single-quoted string value. PHP single-quoted strings only recognise two escape sequences: - `\\` → `\` - `\'` → `'`
(s: &str)
| 635 | /// - `\\` → `\` |
| 636 | /// - `\'` → `'` |
| 637 | fn php_unescape_single_quoted(s: &str) -> String { |
| 638 | s.replace("\\\\", "\x00") |
| 639 | .replace("\\'", "'") |
| 640 | .replace('\x00', "\\") |
| 641 | } |
| 642 | |
| 643 | /// Escape a string for embedding in a Rust string literal. |
| 644 | fn escape(s: &str) -> String { |