public final class StringUtil extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
NULL_STRING |
| Modifier and Type | Method and Description |
|---|---|
static int |
compareToIgnoreCaseStable(String s1,
String s2)
Same as
String.compareToIgnoreCase(String), but if the strings
are equal when ignoring the case they are compared again case sensitively
to ensure a stable order between the two strings. |
static String |
quoted2(@Nullable String text) |
static String |
quotedIfNeeded(String s) |
public static final String NULL_STRING
public static int compareToIgnoreCaseStable(String s1, String s2)
String.compareToIgnoreCase(String), but if the strings
are equal when ignoring the case they are compared again case sensitively
to ensure a stable order between the two strings.
This method does not take locale into account, and may result in an unsatisfactory ordering for certain locales.
Copyright © 2023 abego Software GmbH, Germany. All rights reserved.