docs: public static String pad(String str, int totalChars) {
      if (str == null) {
        str = "null";
      }
      int slen = str.length();
      StringBuilder sb = new StringBuilder(str);
      for (int i = 0; i < totalChars - slen; i++) {
        sb.append(' ');
      }
      return sb.toString();
    }