Skip to content

jayesbe/base36

Repository files navigation

Base36

Latest Version on Packagist Software License Build Status Coverage Status Quality Score Total Downloads

Base36 string encode and decode.

Installation

Via Composer

$ composer require odan/base36

Requirements

  • PHP 7.0+

Usage

use Odan\Encoding\Base36;

$str = "abc 1234";

// Encode
$base36 = new Base36();
$enc = $base36->encode($str); // MFRGGIBRGIZTI====

// Decode
echo $base36->decode($enc); // abc 1234

Without padding and only lowercase

$str = "abc 1234";

// Encode
$enc = $base36->encode($str, false);
$enc = strtolower($enc); // mfrggibrgizti

// Decode
echo $base36->decode(strtoupper($enc));

Testing

$ composer test

Contributing

Please see CONTRIBUTING and CONDUCT for details.

Credits

  • Bryan Ruiz

License

The MIT License (MIT). Please see License File for more information.

About

Base36 string encode and decode

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages