lenny4/compress-int
最新稳定版本:v1.1.1
Composer 安装命令:
composer require lenny4/compress-int
包简介
Compress integer into alphanumeric
关键字:
README 文档
README
Installation
You can install the package via composer:
composer require lenny4/compress-int
Usage
$number = 123456; $compress = Lenny4\CompressInt::compress($number); // e7w $decompress = Lenny4\CompressInt::decompress($compress); // 123456
You can change symbols use for compress and decompress:
$number = 123456; $customSymbols = '0123456789abcdefghijklmnopqrstuvwxyz' $compress = Lenny4\CompressInt::compress($number, $customSymbols); $decompress = Lenny4\CompressInt::decompress($compress, $customSymbols);
Symbols:
Lenny4\CompressInt::DEFAULT_SYMBOLS // 0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ Lenny4\CompressInt::LONG_SYMBOLS // 0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ!#$%&()*+,-/:;<=>?@[\]^_{|}~ Lenny4\CompressInt::DEFAULT_SYMBOLS_INSENSITIVE // 0123456789abcdefghijklmnopqrstuvwxyz Lenny4\CompressInt::LONG_SYMBOLS_INSENSITIVE // 0123456789abcdefghijklmnopqrstuvwxyz!#$%&()*+,-/:;<=>?@[\]^_{|}~
Testing
composer test
License
The MIT License (MIT). Please see License File for more information.
统计信息
- 总下载量: 1.73k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2021-11-19