newbase60-0.1.0.0: Encodes and decodes numbers using Tantek Çelik's New Base 60 number system.
Safe HaskellSafe-Inferred
LanguageHaskell2010

Data.String.NewBase60

Synopsis

Documentation

numToSxg :: Integer -> String Source #

Convert a number into its New Base 60 representation.

For more information, see this link.

sxgToNum :: String -> Integer Source #

Convert a New Base 60-encoded number into an Integer.

Valid New Base 60 characters are alphanumeric or underscores (that is, they individually match the regex `[a-zA-Z0-9_]`). Invalid characters will be treated as if they did not exist. Empty strings will evaluate to 0.

If the resulting value is larger than 2sup128/sup, then this function will return None.

For more information, see this link.