danielnarey/elm-toolkit/6.1.0

NOTE: this package is not compatible with Elm 0.19.1

Toolkit.String

toBool : String -> Result String Bool

Convert a boolean string to a Bool, ignoring case

toBool "true"     --> Ok True
toBool "True"     --> Ok True
toBool "false"    --> Ok False
toBool "FALSE"    --> Ok False
toBool "blah"     --> Err "String argument must be 'true' or 'false' (case ignored)"