| 1156 | // } |
| 1157 | |
| 1158 | public static String padEnd(Object input, Object length2, Object padStr) { |
| 1159 | int length = toInt(length2); |
| 1160 | String str = toString(input); |
| 1161 | String pad = toString(padStr); |
| 1162 | |
| 1163 | if (pad.isEmpty()) { |
| 1164 | throw new IllegalArgumentException("padStr must not be empty"); |
| 1165 | } |
| 1166 | |
| 1167 | while (str.length() < length) { |
| 1168 | str += pad; |
| 1169 | } |
| 1170 | |
| 1171 | return str.substring(0, length); |
| 1172 | } |
| 1173 | |
| 1174 | public static String padStart(Object input, Object length2, Object padStr) { |
| 1175 | int length = toInt(length2); |