quoteStringOn

fun StringBuilder.quoteStringOn(string: A_String, map: MutableMap<Int, Int>? = null)

Quote the given string, making it presentable as an Avail string literal. If a mutable map is provided, populate it with the correspondence between each one-based position in the input string and its zero-based position in the receiver, a StringBuilder. Include a final entry for just past the end of the string to the close quote of the builder.

Receiver

The StringBuilder on which to write the quoted string.

Parameters

string

The A_String to quote.

map

The optional MutableMap to populate from one-based positions in the given string to corresponding zero-based positions in the builder.