aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/com
diff options
context:
space:
mode:
authorSven Göthel <[email protected]>2024-02-04 07:15:27 +0100
committerSven Göthel <[email protected]>2024-02-04 07:15:27 +0100
commitd9604cf4687c3f4e14967ee748749c784fd1578f (patch)
tree4fd017ae7ca87ea35042488d254e932598490d37 /src/java/com
parent1947c156ca033d98c40435d17bdfc70ab53db7af (diff)
Rename StringUtil.strip() -> StringUtil.trim(), refine API docHEADmaster
Diffstat (limited to 'src/java/com')
-rw-r--r--src/java/com/jogamp/common/util/StringUtil.java10
1 files changed, 6 insertions, 4 deletions
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}.
+ * <p>
+ * 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}.
+ * </p>
* @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 "";
}