escape
lib.strings.escape
Docs pulled from | This Revision | 10 minutes ago
Escape occurrence of the elements of list
in string
by
prefixing it with a backslash.
Inputs
list
- 1. Function argument
string
- 2. Function argument
Type
escape :: [string] -> string -> string
Examples
lib.strings.escape
usage example
escape ["(" ")"] "(foo)"
=> "\\(foo\\)"
Noogle detected
Implementation
The following is the current implementation of this function.
escape = list: replaceStrings list (map (c: "\\${c}") list);