alecrabbit/php-wcwidth
最新稳定版本:1.0.0
Composer 安装命令:
composer require alecrabbit/php-wcwidth
包简介
Calculate width of unicode strings rendered to a terminal
README 文档
README
This is kinda port of python's jquast/wcwidth
Installation
$ composer require alecrabbit/php-wcwidth
Quick start
use function AlecRabbit\WcWidth\wcwidth; use function AlecRabbit\WcWidth\wcswidth; echo wcwidth('a'); // 1 echo wcwidth('é'); // 1 echo wcwidth('????'); // 2 echo wcswidth('????????????'); // 6 echo wcwidth('????????????'); // 2 - only first char is considered
see doc/usage.md for more details.
FFI extension
Note ‼️ Experimental feature.
For improved performance, consider leveraging the Foreign Function Interface (FFI) extension, if available. To enable
this feature, set the USE_FFI environment variable to true.
USE_FFI=true
Note When using
ffiextensionversionvalue is ignored completely.
统计信息
- 总下载量: 27.41k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 4
- 点击次数: 1
- 依赖项目数: 2
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 未知