//出處:網(wǎng)上搜集
//made by yaosansi 2005-12-02
//For more visit
http://www.yaosansi.com// Trim() , Ltrim() , RTrim() , Len()
String.prototype.Len=function()
{
return this.replace([^x00-xff]/g,"aa").length;
}
String.prototype.Trim = function()
{
return this.replace(/(^\s*)|(\s*$)/g, "");
}
String.prototype.LTrim = function()
{
return this.replace(/(^\s*)/g, "");
}
String.prototype.RTrim = function()
{
return this.replace(/(\s*$)/g, "");
}
本站僅提供存儲服務(wù),所有內(nèi)容均由用戶發(fā)布,如發(fā)現(xiàn)有害或侵權(quán)內(nèi)容,請
點擊舉報。