Laravel 8 Str::finish() {#collection-method}
2021-07-19 10:27 更新
Str::finish
方法将指定的字符串修改为以指定的值结尾的形式:
use Illuminate\Support\Str;
$adjusted = Str::finish('this/string', '/');
// this/string/
$adjusted = Str::finish('this/string/', '/');
// this/string/
以上内容是否对您有帮助:
更多建议: