docs: function itrim(str, targetStr) {
      var retStr = "";
      var replaced = targetStr;
      var regStr;
  
      if (typeof str != "string") {
          return retStr;
      }
  
      if (typeof targetStr != "string" || !targetStr) {
          targetStr = "\\s";
          replaced = " ";
      }
  
      regStr = new RegExp(targetStr + "+", "g");
  
      str = str.replace(regStr, replaced);
      return str;
  }