Skip to content
Base62 encoder/decoder in pure Elixir
Elixir
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
lib Added: property test (#8) May 20, 2018
test Added: property test (#8) May 20, 2018
.formatter.exs Added: property test (#8) May 20, 2018
.gitignore Added: property test (#8) May 20, 2018
.travis.yml new travis ci matrix (#28) Aug 4, 2019
LICENSE Add LICENSE Mar 1, 2015
README.md Drop gratipay badge May 20, 2018
mix.exs Added: property test (#8) May 20, 2018
mix.lock

README.md

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}

License

Released under the MIT License.

You can’t perform that action at this time.