negasus / numeral-system
Numeral System
1.0
2017-02-12 23:03 UTC
Requires
- php: ~5.6|~7.0
Requires (Dev)
- phpunit/php-code-coverage: ^4.0
- phpunit/phpunit: ~4.0||~5.0
- squizlabs/php_codesniffer: 2.*
This package is not auto-updated.
Last update: 2024-12-22 02:02:33 UTC
README
Code and decode numbers with any numeral system.
Bin, Hex, your numeral systems with custom alphabet!
More info in the wiki
Structure
src/
tests/
vendor/
Install
Via Composer
$ composer require negasus/numeralsystem
Usage
$numeralSystem = new Negasus\NumeralSystem(); // Default alphabet echo $numeralSystem->encode(1048576); // see: 4OmW $numeralSystem->setAlphabet($numeralSystem::ALPHABET_HEX); echo $numeralSystem->encode(172224397); // see: A43EF8D $numeralSystem->setAlphabet('AbCd'); echo $numeralSystem->encode(172224397); // see: CCbAAddCddCAdb
More info in the wiki
Change log
Please see CHANGELOG for more information on what has changed recently.
Testing
$ composer test
License
The MIT License (MIT). Please see License File for more information.