qtil
advanced-security/qtil-swift 0.0.3
Search

Module SeparatedEscape::Concat

A module that can concatenate all of the results of a predicate, unordered, using the specified separator and escaping each item as necessary.

For an unordered version of this module, for cases such as maintaining a set of strings, where the order does not matter, use the module ConcatUnordered.

Usage:

import SeparatedEscape<Separator::comma/0, defaultEscapeMap> as CSV

string name(int idx) { idx = 1 and result = "foo" or idx = 2 and result = "bar" }

// Selects "foo,bar"
select CSV::Concat<names/0>::join()

Import path

import qtil.strings.Escape

Predicates

join

Join all items returned by the specified predicate, escaping each item using backslash as the escape character.

Parameters

itemspred