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?"