Skip to content

eterps/fmt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

fmt

Utilities for formatting Strings.

Example

import fmt

fn test_to_string(val) {
  fmt.to_string(val)  // Converts any value to String
}

fn test_append(a_list) {
  case a_list {
    [] -> "list is empty"
    [x] -> "list has one element: " |> fmt.append(x)  // Appends any value as a String
    [x, y] -> "list has two elements: "
      |> fmt.append(x)
      |> fmt.append(" and ")
      |> fmt.append(y)
    _ -> "list has more than two elements"
  }
}

Quick start

# Build the project
rebar3 compile

# Run the eunit tests
rebar3 eunit

# Run the Erlang REPL
rebar3 shell

Installation

If available in Hex this package can be installed by adding fmt to your rebar.config dependencies:

{deps, [
    fmt
]}.

About

Utilities for formatting Strings in Gleam

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages