Simple, pipable helpers to avoid difficult-to-read String concatenation
by interpolating String values.
You can either specify placeholder names or push values into the next empty placeholder.
"""
{{ named }} is replaced everywhere {{ named }},
whereas empty placeholders: {{ }} and {{ }},
act as unique slots for the value function
"""
|> String.Format.value "first"
|> String.Format.namedValue "named" "yay!"
|> String.Format.value "second"
-- """
-- yay! is replaced everywhere yay!,
-- whereas empty placeholders: first and second,
-- act as unique slots for the value function
-- """Interpolate the next unnamed placeholder
"{{ }} comes before {{ }}"
|> String.Format.value "dinner"
|> String.Format.value "dessert"
-- "dinner comes before dessert"
Interpolate a named placeholder