Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/main/java/org/apache/commons/lang3/StringUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -8819,8 +8819,8 @@ public static String truncate(final String str, final int maxWidth) {
* Specifically:
* </p>
* <ul>
* <li>If {@code str} is less than {@code maxWidth} characters long, return it.</li>
* <li>Else truncate it to {@code substring(str, offset, maxWidth)}.</li>
* <li>If {@code str} is shorter than {@code maxWidth}, returns a String containing the same characters.</li>
* <li>Else truncate it to a substring starting at {@code offset} with a maximum length of {@code maxWidth}.</li
* <li>If {@code maxWidth} is less than {@code 0}, throw an {@link IllegalArgumentException}.</li>
* <li>If {@code offset} is less than {@code 0}, throw an {@link IllegalArgumentException}.</li>
* <li>In no case will it return a String of length greater than {@code maxWidth}.</li>
Expand Down Expand Up @@ -8861,7 +8861,7 @@ public static String truncate(final String str, final int maxWidth) {
*
* @param str the String to truncate, may be null.
* @param offset left edge of source String.
* @param maxWidth maximum length of result String, must be positive.
* @param maxWidth maximum length of result String, must be non-negative.
* @return truncated String, {@code null} if null String input.
* @throws IllegalArgumentException If {@code offset} or {@code maxWidth} is less than {@code 0}.
* @since 3.5
Expand Down