This is an alternative site for discovering Elm packages. You may be looking for the official Elm package site instead.
1.0.1
Avoid ugly String concatenation with pipable interpolation helpers
version 1.0.0
license BSD3
native-modules False
elm-version 0.18.0 <= v < 0.19.0
Tag 1.0.0
Committed At 2018-08-14 22:10:58 UTC
elm-lang/core 5.1.1 <= v < 6.0.0 5.1.1

Modules

README

String.Format

String.Format exposes simple helpers for String interpolation to help you avoid difficult-to-read String concatenation. Both named and unnamed placeholders are supported.

import String.Format


-- Bad
hello : String -> String
hello name =
    "Hello, " ++ name ++ "!"


-- Readable
hello : String -> String
hello name =
    "Hello, {{ }}!"
        |> String.Format.value name


-- More readable
hello : String -> String
hello name =
    "Hello, {{ name }}!"
        |> String.Format.namedValue "name" name