shouding / mix-string
当Unicode字符和ASCII字符混合时,根据您的需求计算字符串长度
1.0.0
2016-06-18 02:59 UTC
Requires
- danielstjules/stringy: ~2.3
This package is not auto-updated.
Last update: 2024-09-23 13:04:45 UTC
README
描述
当Unicode字符和ASCII字符混合时,根据您的需求计算字符串长度
示例
需要Composer
{ "require": { "shouding/mix-string": "1.0.0" } }
>>> require('vendor/autoload.php') => Composer\Autoload\ClassLoader {#162} >>> use Shouding\Mix\Str; => null >>> Str::length("this is a test 中国") => 6 >>> Str::length("this is a test 中国", Str::TYPE_CHAR) => 17 >>> Str::length("this is a test 中国", Str::TYPE_BYTES) => 21