mat
Functions
pub fn format1(template: String, a: a) -> String
Formats the template
string, replacing the first occurrence of "{}"
with a display-value of a
pub fn format2(template: String, a: a, b: b) -> String
Formats the template
string, replacing the first occurrence of "{}"
with a display-value of a
, second "{}"
with b
pub fn format3(template: String, a: a, b: b, c: c) -> String
Formats the template
string, replacing the first occurrence of "{}"
with a display-value of a
, second "{}"
with b
, etc.
pub fn format4(
template: String,
a: a,
b: b,
c: c,
d: d,
) -> String
Formats the template
string, replacing the first occurrence of "{}"
with a display-value of a
, second "{}"
with b
, etc.
pub fn format5(
template: String,
a: a,
b: b,
c: c,
d: d,
e: e,
) -> String
Formats the template
string, replacing the first occurrence of "{}"
with a display-value of a
, second "{}"
with b
, etc.
pub fn format_list(template: String, values: List(a)) -> String
Formats the template
string, replacing each "{}"
with the display-values of consecutive elements of values
.
Excessive elements of values
are ignored.
Placeholders ("{}"
) which don’t have a corresponding element are left as-is.