阅读(4217) (9)

Laravel 8 Str::startsWith()

2021-07-03 16:54:23 更新

Str::startsWith 方法是判断第二个参数是否是第一个参数的开头返回 true or false

use Illuminate\Support\Str;

$result = Str::startsWith('This is my name', 'This');

// true