字符函数str

 1、判断字符串开头是否为给定内容

$res1 = Str::StartsWith('ruike','rppui');

false

 

2、判断字符串结尾是否为给定内容

Str::endsWith('ruike','ke');

3、给定字符串换成首字母大写

Str::studly('rui_me');

RuiMe

 

posted @ 2022-10-27 10:25  WH迪诺  阅读(296)  评论(0)    收藏  举报