【文件属性】:
文件名称:str:具有多字节支持的快速,可靠和强大的类型化字符串操作库
文件大小:28KB
文件格式:ZIP
更新时间:2021-02-02 17:12:18
php library string php-library utf-8
关于
str / str
$ str = new Str ( 'Hello, 世界' );
$ str -> last ( 2 ); // 世界
$ str -> chars (); // ['世', '界']
$ str
-> ensureLeft ( 'Hello, ' ) // Hello, 世界
-> ensureRight ( '!!!' ) // Hello, 世界!!!
-> trimRight ( '!' ) // Hello, 世界
-> prepend ( 'Str say - ' ); // Str say - Hello, 世界
$ send = function ( string $ s ) {};
$ send (( string ) $ str ); // same
$ send ( $ str -> getString ()); // same
安装
要求:
php7.1
composer require str/str
产品特点
强类型
没有异常抛出
快速
新功能
具有多字节支持的快速字符串处理库。 受到库
【文件预览】:
str-master
----src()
--------Str.php(81KB)
----LICENSE(1KB)
----composer.json(1KB)
----README.md(36KB)
----benchmark.md(89KB)