qtil
advanced-security/qtil-swift 0.0.3
Search

Predicate SeparatedEscape::split

Split and unescape the nth item in the string, starting at zero, separated by the separator character, escaped by a custom escape character.

For instance, split("foo\\,bar,baz\\\\qux", 0, charOf("\\")) will yield foo,bar, while index 1 will yield baz\\qux.

Note: adding pragma[inline_late] is very important for compilation speed. Otherwise, we hit pathological cases of possible binding sets after inlining every involved predicate, which must occur due to the bindingset. The performance effects of inline_late on callers has not yet been evaluated.

Import path

import qtil.strings.Escape
string split(string str, int index, Char escaper)