定制 alecrabbit/php-wcwidth 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

alecrabbit/php-wcwidth

最新稳定版本:1.0.0

Composer 安装命令:

composer require alecrabbit/php-wcwidth

包简介

Calculate width of unicode strings rendered to a terminal

README 文档

README

PHP Version Build Status

Build Status Scrutinizer Code Quality Code Coverage

Latest Stable Version Latest Stable Version Latest Unstable Version

License Total Downloads

This is kinda port of python's jquast/wcwidth

???? Unicode release files

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 ffi extension version value is ignored completely.

统计信息

  • 总下载量: 27.41k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 4
  • 点击次数: 7
  • 依赖项目数: 2
  • 推荐数: 0

GitHub 信息

  • Stars: 4
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 未知