docs: public static String justifyCenter( String str,
                                          final int width,
                                          char padWithChar ) {
          // Trim the leading and trailing whitespace ...
          str = str != null ? str.trim() : "";
  
          int addChars = width - str.length();
          if (addChars < 0) {
              // truncate
              return str.subSequence(0, width).toString();
          }
          // Write the content ...
          int prependNumber = addChars / 2;
          int appendNumber = prependNumber;
          if ((prependNumber + appendNumber) != addChars) {
              ++prependNumber;
          }
  
          final StringBuilder sb = new StringBuilder();
  
          // Prepend the pad character(s) ...
          while (prependNumber > 0) {
              sb.append(padWithChar);
              --prependNumber;
          }
  
          // Add the actual content
          sb.append(str);
  
          // Append the pad character(s) ...
          while (appendNumber > 0) {
              sb.append(padWithChar);
              --appendNumber;
          }
  
          return sb.toString();
      }