qtil
advanced-security/qtil-swift 0.0.3
Search

Module WrapEscape

A module for wrapping a string with a character, and escaping the wrapping character in the string.

For instance, this can wrap a string with double quotes, and escape the double quotes already in the string.

Takes an escape map predicate escapeMap that defines additional escaping behavior, such as turning newlines into an escaped n.

Import path

import qtil.strings.Escape

Predicates

newEscapeMap

Add the wrapping character to the escape map, so that it is escaped to itself.

unwrapUnescaping
unwrapUnescaping
wrapEscaping
wrapEscaping

Escape a string using the escape map, and wrap the result with the wrapping character.

Parameters

wrapCharpred
escapeMappred