string_format

Functions

pub fn end(state: #(List(String), String, Int)) -> String
pub fn f(
  state: #(List(String), String, Int),
  val: a,
) -> #(List(String), String, Int)
pub fn format(fmtstr: String) -> #(List(a), String, Int)

Inserts strings, ints or floats into placeholders similar to str.format() in Python

Examples

format("hello {}, pi equals {}!") |> f("World") |> f(3.14) |> end()
// -> "hello World, pi equals 3.14!"
Search Document