You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* @param maxWidth maximum length of result String, must be at least 4.
228
+
* @param str the String to check, may be null.
229
+
* @param maxWidth maximum length of result String, must be at least 4.
232
230
* @return abbreviated String, {@code null} if null String input.
233
231
* @throws IllegalArgumentException if the width is too small.
234
232
* @since 2.0
@@ -238,7 +236,7 @@ public static String abbreviate(final String str, final int maxWidth) {
238
236
}
239
237
240
238
/**
241
-
* Abbreviates a String using ellipses. This will turn "Now is the time for all good men" into "...is the time for..."
239
+
* Abbreviates a String using ellipses. This will convert "Now is the time for all good men" into "...is the time for...".
242
240
*
243
241
* <p>
244
242
* Works like {@code abbreviate(String, int)}, but allows you to specify a "left edge" offset. Note that this left edge is not necessarily going to be the
@@ -260,8 +258,8 @@ public static String abbreviate(final String str, final int maxWidth) {
@@ -276,15 +274,15 @@ public static String abbreviate(final String str, final int offset, final int ma
276
274
}
277
275
278
276
/**
279
-
* Abbreviates a String using another given String as replacement marker. This will turn "Now is the time for all good men" into "Now is the time for..." if
280
-
* "..." was defined as the replacement marker.
277
+
* Abbreviates a String using another given String as replacement marker. This will convert "Now is the time for all good men" into "Now is the time for..."
278
+
* if "..." was defined as the replacement marker.
281
279
*
282
280
* <p>
283
281
* Specifically:
284
282
* </p>
285
283
* <ul>
286
284
* <li>If the number of characters in {@code str} is less than or equal to {@code maxWidth}, return {@code str}.</li>
287
-
* <li>Else abbreviate it to {@code (substring(str, 0, max-abbrevMarker.length) + abbrevMarker)}.</li>
285
+
* <li>Else abbreviate it to {@code (substring(str, 0, max - abbrevMarker.length) + abbrevMarker)}.</li>
288
286
* <li>If {@code maxWidth} is less than {@code abbrevMarker.length + 1}, throw an {@link IllegalArgumentException}.</li>
289
287
* <li>In no case will it return a String of length greater than {@code maxWidth}.</li>
290
288
* </ul>
@@ -298,8 +296,8 @@ public static String abbreviate(final String str, final int offset, final int ma
@@ -314,7 +312,7 @@ public static String abbreviate(final String str, final String abbrevMarker, fin
314
312
}
315
313
316
314
/**
317
-
* Abbreviates a String using a given replacement marker. This will turn "Now is the time for all good men" into "...is the time for..." if "..." was
315
+
* Abbreviates a String using a given replacement marker. This will convert "Now is the time for all good men" into "...is the time for..." if "..." was
318
316
* defined as the replacement marker.
319
317
*
320
318
* <p>
@@ -335,15 +333,16 @@ public static String abbreviate(final String str, final String abbrevMarker, fin
0 commit comments