lost22git / fmt

gleam string format

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

fmt

gleam string format

import gleeunit
import gleeunit/should
import gleam/dynamic
import fmt
pub fn fmt_test() {
  fmt.fmt("{2:->10} πŸ– {{{:^10}}} πŸ’Š {0:-<10}", [
    dynamic.from("foo"),
    dynamic.from("bar"),
    dynamic.from([1, 2]),
  ])
  |> should.equal("----[1, 2] πŸ– {  \"bar\"   } πŸ’Š \"foo\"-----")
}

Further documentation can be found at https://hexdocs.pm/fmt.

Development

gleam run   # Run the project
gleam test  # Run the tests
gleam shell # Run an Erlang shell

About

gleam string format

License:MIT License


Languages

Language:Gleam 100.0%