Module Escape
A module that provides utilities for escaping and unescaping strings, including backslash escaping, double-quote wrapping, and separator-aware escaping for CSV-like formats.
Import path
import qtil.strings.EscapePredicates
| defaultEscapeMap | An escape map that escapes newlines, carriage returns, and tabs, to |
| doubleQuoteEscaping | Wrap a string with double quotes, adding a backslash escape character if necessary. |
| emptyEscapeMap | |
| escapeRegex | Add escapes to a string literal to make it safe for use in a Java-style PRCE regex, as a direct character by character match. |
| regexEscapeMap | A predicate to define an escape map that allows for any string to be escaped in such a way that it can be used in a regex, and matches itself (e.g., special characters match themselves rather than changing the meaning of the regex). |
| singleQuoteEscaping | Wrap a string with single quotes, adding a backslash escape character if necessary. |
| unescapeDoubleQuote | Unwrap a string with double quotes, removing the double quotes and any escape characters. |
| unescapeSingleQuote | Unwrap a string with single quotes, removing the single quotes and any escape characters. |
Modules
| Escape | A module for building predicates that escape and unescape strings, based on a map of characters to escape and their escaped equivalents in the predicate |
| SeparatedEscape | A module for making CSV-like separated strings, with a custom separator and escape character. |
| WrapEscape | A module for wrapping a string with a character, and escaping the wrapping character in the string. |