阅读(2748)
赞(6)
Laravel 8 rtrim {#collection-method}
2021-07-05 09:43:52 更新
rtrim
方法用于从字符串的右边移除指定字符:
use IlluminateSupportStr;
$string = Str::of(' Laravel ')->rtrim();
// ' Laravel'
$string = Str::of('/Laravel/')->rtrim('/');
// '/Laravel'