Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/fredcy/elm-parseint

Elm function for converting a String value to Int
https://github.com/fredcy/elm-parseint

Last synced: 15 days ago
JSON representation

Elm function for converting a String value to Int

Awesome Lists containing this project

README

        

# elm-parseint
Convert String value to Int, or Int to String, with given radix.

The `parseInt` function here is similar to Javascript's parseInt(), parsing a
decimal string and returning the corresponding Int value if any. `parseIntOct`,
`parseIntHex`, and `parseIntRadix` parse strings encoded as octal, hexadecimal,
or arbitrary radix, respectively.

The `toRadix` function inverts `parseInt`, converting an Int to a String with a
given radix. `toRadix 10` is equivalent to `toString` for Int arguments.