
String.prototype.trimLeft=function(){
return this.replace(/(^\s*)/g,"");}
String.prototype.trimRight=function(){
return this.replace(/(\s*$)/g,"");}
String.prototype.trim=function(){
return this.replace(/(^\s*)|(\s*$)/g,"");}
if(!String._FORMAT_SEPARATOR){
String._FORMAT_SEPARATOR=String.fromCharCode(0x1f);
String._FORMAT_ARGS_PATTERN=new RegExp('^[^'+String._FORMAT_SEPARATOR+']*'+new Array(100).join('(?:.([^'+String._FORMAT_SEPARATOR+']*))?'));}
if(!String.format){
String.format=function(s){
return Array.prototype.join.call(arguments,String._FORMAT_SEPARATOR).replace(String._FORMAT_ARGS_PATTERN,s);}}
if(!''.format){
String.prototype.format=function(){
return(String._FORMAT_SEPARATOR+Array.prototype.join.call(arguments,String._FORMAT_SEPARATOR)).replace(String._FORMAT_ARGS_PATTERN,this);}}

