phplang/base65536
Composer 安装命令:
composer require phplang/base65536
包简介
Base65536 encode/decode utility
关键字:
README 文档
README
Base65536 is a binary encoding optimised for UTF-32-encoded text and Twitter. This PHP composer package, phplang/base65536, is loosely based on qntm/base65536.
Usage
use \PhpLang\Base65536; $buf = 'hello world'; $str = Base65536::encode($buf); echo $str; // 6 codes points, '驨ꍬ啯𒁷ꍲᕤ' var_dump($buf === Base65536::decode($str)); // bool(true)
Note
Per the spec, the default encoding used for input to decode() and output from encode() is CESU-8, a variant of UTF-8 which encodes split UTF-16 surrogate pairs. If you want true UTF-8 output, you must specify so using the second parameter to encode() and decode().
License
MIT, to match the generous licensing of the original. :D
统计信息
- 总下载量: 23
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 11
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2017-06-25