JSLite - 字串處理
如有疑問歡迎到這些地方交流,歡迎加入JSLite.io組織團體共同開發!
$.trim
去掉字串起始和結尾的空格。
$.trim(" hello, how are you? ");//⇒ "hello, how are you?"
trim
同上,去掉字串起始和結尾的空格。
" hello, how are you? ".trim()//⇒ "hello, how are you?"
如有疑問歡迎到這些地方交流,歡迎加入JSLite.io組織團體共同開發!
去掉字串起始和結尾的空格。
$.trim(" hello, how are you? ");//⇒ "hello, how are you?"
同上,去掉字串起始和結尾的空格。
" hello, how are you? ".trim()//⇒ "hello, how are you?"