Js 字符串操作函数大全 /* ****************************************** 字符串函数扩充 ****************************************** */ /* =========================================== //去除左边的空格 =========================================== */ String
prototype
LTrim = function() { return this
replace(/(^\s*)/g, ""); } /* =========================================== //去除右边的空格 =========================================== */ String
prototype
Rtrim = function() { return this
replace(/(\s*$)/g, ""); } /* =========================================== //去除前后空格 =========================================== */ String
prototype
Trim = function() { return this
replace(/(^\s*)|(\s*$)/g, ""); } /* =========================================== //得到左边的字符串 =========================================== */ String
prototype
Left = function(len)