Escapes

The one escaping rule of Wow's identity texts: a name joined into a text with separators has each separator it holds, and % itself, percent-escaped as % and two upper-case hex digits, so the text splits back one way only. A name that holds none of them is the text as it is, so an ordinary name reads the same in every text. AggregateRef's and ExecutionId's texts, the ledger's ops ids and the timers' ids use it.

Functions

Link copied to clipboard
fun escaped(text: String, reserved: String): String

text with each character of reserved escaped (%2F for /); reserved holds % and ASCII characters only. One scan, and text itself, not a copy, when it holds none of them.

Link copied to clipboard
fun typeText(type: AggregateType, reserved: String): String

The text of type in an identity whose separators are reserved: its context, with . reserved too, a ., and its name, each escaped, so a.b's c and a's b.c stay apart. An ordinary type reads context.name.

Link copied to clipboard
fun unescaped(text: String): String?

The text escaped made text from: each %XX decoded; null when a % is not followed by two upper-case hex digits.