From d9604cf4687c3f4e14967ee748749c784fd1578f Mon Sep 17 00:00:00 2001 From: Sven Göthel Date: Sun, 4 Feb 2024 07:15:27 +0100 Subject: Rename StringUtil.strip() -> StringUtil.trim(), refine API doc --- src/java/com/jogamp/common/util/StringUtil.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src/java/com') diff --git a/src/java/com/jogamp/common/util/StringUtil.java b/src/java/com/jogamp/common/util/StringUtil.java index 4084a03..b9c86b9 100644 --- a/src/java/com/jogamp/common/util/StringUtil.java +++ b/src/java/com/jogamp/common/util/StringUtil.java @@ -177,9 +177,11 @@ public class StringUtil { } /** - * Remove all given separator unicode characters from given text, - * i.e. all leading, all ending as well as duplicate consecutive separator within. - * The latter reduces the separator to just a single one. + * Remove all leading, trailing and duplicate-within {@code separators} unicode character from the {@code text}. + *

+ * Duplicate {@code separators} unicode character within the {@code text} are reduced to one occurrence + * and might be replaced with {@code replacement} if not {@code null}. + *

* @param text the source text * @param separators separator unicode characters, pass {@code null} for {@link Character#isWhitespace(int) whitespace}. * Consider using {@link #WHITESPACE} to cover all unicode space character. @@ -187,7 +189,7 @@ public class StringUtil { * If {@code null}, the first found separator is used. * @return stripped text */ - public static String strip(final String text, final String separators, final String replacement) { + public static String trim(final String text, final String separators, final String replacement) { if (text == null ) { return ""; } -- cgit v1.2.3