StringFormatter
General purpose string formatter, with the following features:
- On all Showables,
show
is called instead oftoString
- Exceptions raised by a
show
are handled by falling back totoString
. - Sequences can be formatted using the desired separator between two
%
signs, egi"myList = (${myList}%, %)"
- Safe handling of multi-line margins. Left margins are skipped om the parts of the string context before inserting the arguments. That way, we guard against accidentally treating an interpolated value as a margin.