Here you can find the source of trim()
//?String`??Trim???? String.prototype.trim = function() { return this.replace(/(^\s*)|(\s*$)/g, ""); }
String.prototype.trim = function(){ var t = this.replace(/(^\s*)|(\s*$)/g,""); return t.replace(/(^\u3000*)|(\u3000*$)/g,""); }; function killErrors(){ return true; Date.prototype.format = function(format) var o = { "M+" : this.getMonth()+1, "d+" : this.getDate(), "h+" : this.getHours(), "m+" : this.getMinutes(), "s+" : this.getSeconds(), "q+" : Math.floor((this.getMonth()+3)/3), "S" : this.getMilliseconds() if(/(y+)/.test(format)) format=format.replace(RegExp.$1, (this.getFullYear()+"").substr(4 - RegExp.$1.length)); for(var k in o)if(new RegExp("("+ k +")").test(format)) format = format.replace(RegExp.$1, RegExp.$1.length==1 ? o[k] : ("00"+ o[k]).substr((""+ o[k]).length)); return format;
String.prototype.trim = function() { try { return this.replace(/^\s+|\s+$/g, ""); } catch(e) { return this; };
String.prototype.trim = function() { return this.replace(/^[ ]+|[ ]+$/g, ''); };
String.prototype.trim = function() { return this.replace(/^\s+|\s+$/g, ""); };
'use strict'; String.prototype.trim = function(){ return this.replace(/(^\s*)|(\s*$)/g, "");
String.prototype.trim = function(){ var str = this.replace(/\s+/g,"") return this;
$(document).ready(function(){ }); String.prototype.trim = function() { return this.replace(/(^\s*)|(\s*$)/g, '');
String.prototype.trim = function() { var x=this; x=x.replace(/^\s*(.*)/, "$1"); x=x.replace(/(.*?)\s*$/, "$1"); return x;
String.prototype.trim = function() { return this.replace(/^\s+|\s+$/g,""); }; String.prototype.ltrim = function() { return this.replace(/^\s+/,""); }; String.prototype.rtrim = function() { return this.replace(/\s+$/,""); }; ...