JavaScript 字符串函数扩充

/*
******************************************
             字符串函数扩充  (StringEx.js)                              
******************************************
*/

//移除两边空白
String.prototype.Trim = function() {
    return this.replace(/(^\s*)|(\s*$)/g, "");
}

原文地址:https://www.cnblogs.com/linsongbin/p/1374971.html