php中的幾個字串操作函式strtoupper strtolower ucwords ucfirst lcfirst函式
阿新 • • 發佈:2018-12-30
strtolower($str) 是字串變成小寫
strtoupper($str) 是字串變成大寫
ucfirst($str) 字串首字元大寫
lcfirst($str) 字串首字元小寫
ucwords($str) 字串中各個單詞的首字母大寫。
如果單詞前有逗號時,要實現單詞的首字元大寫,一定要在單詞和逗號之間新增空格!
toString() toUpperCase() toLowerCase()函式是用於javascript的。
eg:str.toUpperCase()