Skip to content
/ base62 Public

Base62 encoder/decoder in pure Elixir

License

Notifications You must be signed in to change notification settings

elixirs/base62

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

90 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Base62 VersionLicenseBuild StatusIssuesDownloads

Base62 encoder/decoder in pure Elixir.

Usage

Encode

iex> Base62.encode(28)
"S"

iex> Base62.encode(44)
"i"

iex> Base62.encode(280)
"4W"

Decode!

iex> Base62.decode!("100")
3844

iex> Base62.decode!("igas")
10650166

iex> Base62.decode!("EvilMartians")
776957886790921093120

Decode

iex> Base62.decode("42")
{:ok, 250}

iex> Base62.decode("Игас")
:error

iex> Base62.decode("Elixir")
{:ok, 13531063449}

Released under the MIT License.