code: public static String leftPad(String str, int size, char padChar) {
      if (str == null) { return null; }
      int pads = size - str.length();
      if (pads <= 0) { return str; // returns original String when possible
      }
      return repeat(padChar, pads).concat(str);
    }
docs: <p>
  Left pad a String with a specified character.
  </p>
  <p>
  Pad to a size of {@code size}.
  </p>
  
  <pre>
  leftPad(null, *, *)     = null
  leftPad("", 3, 'z')     = "zzz"
  leftPad("bat", 3, 'z')  = "bat"
  leftPad("bat", 5, 'z')  = "zzbat"
  leftPad("bat", 1, 'z')  = "bat"
  leftPad("bat", -1, 'z') = "bat"
  </pre>
  
  @param str the String to pad out, may be null
  @param size the size to pad to
  @param padChar the character to pad with
  @return left padded String or original String if no padding is necessary, {@code null} if null
  String input
  @since 3.0