code: function toLength (str, length, format) {
    if (!str) {
      return emptyString(length)
    }
    let newStr = str.toString()
    let diff = cleanString(str).length - length
    if (diff < 0) {
      diff *= -1
    }
    if (!format || format === 'l') {
      newStr = newStr + emptyString(diff)
    } else if (format === 'r') {
      newStr = emptyString(diff) + newStr
    } else { // (format === "c")
      const s = diff / 2
      newStr = emptyString(Math.ceil(s)) + newStr + emptyString(Math.floor(s))
    }
    return newStr
  }
docs: Trims/extends a given string to the specified length.
  If string is too long it will be trimmed with elepsies.
  
  @param str The string to be trimmed/extended
  @param length The desired length of the string
  @param format The align of the string, whether (l)eft, (r)ight or (c)enter aligned.
  @returns {string} The trimmed/extended and aligned string.