navarr/smartstring
Composer 安装命令:
composer require navarr/smartstring
包简介
An object that can intelligently determine whether to use grapheme_* or byte-focused string functions
README 文档
README
SmartString is a library that automatically determines whether a string of text can use PHP's byte manipulation tools, or if it needs to be upgraded to use Grapheme manipulations - allowing you to process text as quickly and as accurately as possible.
Installation
composer require navarr/smartstring
Usage
use Navarr\SmartString\SmartStringFactory; use Navarr\SmartString\SmartString; // Factory Methodology $factory = new SmartStringFactory(); $example = $factory->create('🏴'); echo $example->strlen(); // 1 // Singleton Methodology $example = SmartString::build('Test'); echo $example->strlen(); // 4
统计信息
- 总下载量: 4
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2022-03-07