300字范文,内容丰富有趣,生活中的好帮手!
300字范文 > php中的几个字符串操作函数strtoupper strtolower ucwords ucfirst lcfirst函数

php中的几个字符串操作函数strtoupper strtolower ucwords ucfirst lcfirst函数

时间:2020-07-20 16:24:02

相关推荐

php中的几个字符串操作函数strtoupper strtolower ucwords ucfirst lcfirst函数

strtolower($str) 是字符串变成小写

strtoupper($str) 是字符串变成大写

ucfirst($str) 字符串首字符大写

lcfirst($str) 字符串首字符小写

ucwords($str) 字符串中各个单词的首字母大写。

如果单词前有逗号时,要实现单词的首字符大写,一定要在单词和逗号之间添加空格!

toString() toUpperCase() toLowerCase()函数是用于javascript的。

eg:str.toUpperCase()

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。