function strBehavior(){
   String.prototype.repeat = function(n) {
      return new Array(1 + parseInt(n, 10)).join(this);
   }

   this.fillChar = function(fill, lead, long){
      return(fill.repeat(long - ("" + lead).length) + lead);
      
   }

   this.trim = function(str, chars) {
      return this.ltrim(this.rtrim(str, chars), chars);
   }
 
   this.ltrim = function(str, chars) {
      chars = chars || "\\s";
      return str.replace(new RegExp("^[" + chars + "]+", "g"), "");
   }
 
   this.rtrim = function(str, chars) {
      chars = chars || "\\s";
      return str.replace(new RegExp("[" + chars + "]+$", "g"), "");
   }

}
