Laravel 8 Str::startsWith()
Str::startsWith
方法是判断第二个参数是否是第一个参数的开头返回 true
or false
:
use Illuminate\Support\Str;
$result = Str::startsWith('This is my name', 'This');
// true
Str::startsWith
方法是判断第二个参数是否是第一个参数的开头返回 true
or false
:
use Illuminate\Support\Str;
$result = Str::startsWith('This is my name', 'This');
// true