王清清
行动养成习惯,习惯培养人格,人格影响命运
摘要: //去字符两边的空格String.prototype.trim = function () { var matches = this.match(/^[\s]+/); var prefixLength = (matches == null) ? 0 : matches[0].length; matches = this.match(/[\s]+$/); var suffixLength = (matches == null) ? 0 : matches[0].length; return this.slice(prefixLength, this.length - suffixLength); 阅读全文
posted @ 2012-02-16 11:54 王清清 阅读(429) 评论(6) 推荐(0)