Laravel 8 startsWith {#collection-method}

2021-07-19 10:35 更新

startsWith 用于判斷字符串是否以指定值開頭:

use Illuminate\Support\Str;

$result = Str::of('This is my name')->startsWith('This');

// true 
以上內(nèi)容是否對您有幫助:
在線筆記
App下載
App下載

掃描二維碼

下載編程獅App

公眾號(hào)
微信公眾號(hào)

編程獅公眾號(hào)