
if('undefined'!=typeof(dojo)){dojo.provide("idealista.string");}
String.prototype.localize=function(){var cReturnValue=this;for(var i=0;i<arguments.length;i++){cReturnValue=cReturnValue.replace("{"+i+"}",arguments[i]);}
return cReturnValue;};String.prototype.replaceAll=function(pcFrom,pcTo){var i=this.indexOf(pcFrom);var c=this;while(i>-1){c=c.replace(pcFrom,pcTo);i=c.indexOf(pcFrom);}
return c;}
String.prototype.formatAsThousands=function(){var cCadena=this.replaceAll('.','');var cReturnValue='';var j=0;var i=cCadena.length;for(i;i>0;i--){if(((j%3)==0)&&(j!=0)){cReturnValue='.'+cReturnValue;}
j++;cReturnValue=cCadena.substring(i-1,i)+cReturnValue;}
return cReturnValue;}
String.prototype.getFormat=function(){var cReturnValue='string';if(this==''){cReturnValue='empty';}else if(!isNaN(this)){cReturnValue='number';}else{var aChars=this.split('');for(var i=0;i<aChars.length;i++){if(!isNaN(aChars[i])){cReturnValue='alphanumeric';}}}
return cReturnValue;}
String.prototype.translateEntities=function(){var oTA={};if(!document.getElementById('stringTranslator')){oTA=document.createElement("textarea");oTA.id='stringTranslator';}else{oTA=document.getElementById('stringTranslator');}
oTA.innerHTML=this.replace(/</g,"&lt;").replace(/>/g,"&gt;");return oTA.value;}
String.prototype.trim=function(){return this.replace(/^\s\s*/,'').replace(/\s\s*$/,'');};String.prototype.bool=function(){return(/^true$/i).test(this);};