抱歉510/string

字符串类

dev-master 2020-01-09 08:07 UTC

This package is auto-updated.

Last update: 2024-09-28 16:36:23 UTC


README

一个字符串的工具类

如何使用

composer require sorry510/string 

演示

<?php 

require './vendor/autoload.php';

use sorry510\StringUtil;

$a = StringUtil::chain('  hello  ')->trim()->toUpper()->slice(1, 2); // EL,由__toString()转换
$a = StringUtil::chain('  hello  ')->trim()->toUpper()->slice(1, 2)->value(); // EL