code: function truncate(string, length, end) {
      var ret = string;
      if (comb.isString(ret)) {
          if (string.length > length) {
              if (end) {
                  var l = string.length;
                  ret = string.substring(l - length, l);
              } else {
                  ret = string.substring(0, length);
              }
          }
      } else {
          ret = truncate("" + ret, length);
      }
      return ret;
  }
docs: Truncates a string to the specified length.
  @example
  
  //from the beginning
  comb.string.truncate("abcdefg", 3) => "abc";
  //from the end
  comb.string.truncate("abcdefg", 3,true) => "efg"
  //omit the length
  comb.string.truncate("abcdefg") => "abcdefg"
  
  @param {String} string the string to truncate
  @param {Number} [length = -1] the max length of the string, if the string is
  shorter than the length then the string is returned.
  @param {Boolean} [end=false] truncate starting at the end of the string
  
  @return {String} the truncated string.
  @memberOf comb.string
  @static