ppkarwasz commented on code in PR #1360: URL: https://github.com/apache/commons-lang/pull/1360#discussion_r2008715757
########## src/main/java/org/apache/commons/lang3/StringUtils.java: ########## @@ -342,40 +342,47 @@ public static String abbreviate(final String str, final String abbrevMarker, fin * @throws IllegalArgumentException if the width is too small * @since 3.6 */ - public static String abbreviate(final String str, final String abbrevMarker, int offset, final int maxWidth) { - if (isNotEmpty(str) && EMPTY.equals(abbrevMarker) && maxWidth > 0) { - return substring(str, 0, maxWidth); + public static String abbreviate(final String str, final String marker, int offset, final int maxWidth) { + if (isAnyEmpty(str, marker)) { + return str; Review Comment: This will return a `String` of arbitrary size if `marker` is empty. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@commons.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org