zonuexe/stringwidth
Composer 安装命令:
composer require zonuexe/stringwidth
包简介
Measure string width (support Unicode east asian ambiguous width)
关键字:
README 文档
README
Measure string width (support Unicode east asian ambiguous width)
Install
composer require 'zonuexe/stringwidth:~0.1.1'
Usage
Notice: Input string must be UTF-8 encoded
<?php \Teto\StringWidth::asSingle('ABC'); //=> 3 \Teto\StringWidth::asDouble('ABC'); //=> 3 \Teto\StringWidth::asSingle('☆☆☆'); //=> 3 \Teto\StringWidth::asDouble('☆☆☆'); //=> 6 \Teto\StringWidth::asSingle('도서관'); //=> 6 \Teto\StringWidth::asDouble('도서관'); //=> 6
Copyright
src/StringWidth/Tanasinn/*.php codes are derivatived by tanasinn/wcwidth.js at e432aeec63452e8c4d1e40e93f5f88f1bc729dca · saitoha/tanasinn. USAMI Kenta(@zonuexe) ported to PHP from JavaScript.
see src/StringWidth/Tanasinn/LICENSE.
***** BEGIN LICENSE BLOCK *****
Version: MPL 1.1
The contents of this file are subject to the Mozilla Public License Version
1.1 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.mozilla.org/MPL/
Software distributed under the License is distributed on an "AS IS" basis,
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
for the specific language governing rights and limitations under the
License.
The Original Code is tanasinn
The Initial Developer of the Original Code is * Hayaki Saito.
Portions created by the Initial Developer are Copyright (C) 2010 - 2011
the Initial Developer. All Rights Reserved.
***** END LICENSE BLOCK *****
src/StringWidth.php and test codes are licensed under Mozilla Public License, version 2.0
Copyright (c) 2015 USAMI Kenta
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
file, You can obtain one at http://mozilla.org/MPL/2.0/.
zonuexe/stringwidth 适用场景与选型建议
zonuexe/stringwidth 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 13 次下载、GitHub Stars 达 1, 最近一次更新时间为 2015 年 03 月 22 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「string」 「unicode」 「width」 「eastasian」 「eaw」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 zonuexe/stringwidth 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 zonuexe/stringwidth 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 zonuexe/stringwidth 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
A set of useful PHP classes.
A Laravel 5 Package for Using & Working With Emojis
Let users choose from predefined widths
Encode integer IDs using a preset or customized symbol set
detect the rotate/width/height ... of MP4 video
PHP Unicode library
统计信息
- 总下载量: 13
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 19
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MPL-2.0
- 更新时间: 2015-03-22