Laravel 8 substr {#collection-method}
substr
方法返回字符串中 start 和 length 的参数指定的字符串部分:
use Illuminate\Support\Str;
$string = Str::of('Laravel Framework')->substr(8);
// Framework
$string = Str::of('Laravel Framework')->substr(8, 5);
// Frame
substr
方法返回字符串中 start 和 length 的参数指定的字符串部分:
use Illuminate\Support\Str;
$string = Str::of('Laravel Framework')->substr(8);
// Framework
$string = Str::of('Laravel Framework')->substr(8, 5);
// Frame