public class StringBuilders extends Object
StringBuilders.| Modifier and Type | Method and Description |
|---|---|
static void |
clear(StringBuilder builder)
Clears the contents of the given builder.
|
static boolean |
isNullOrEmpty(StringBuilder builder)
Checks whether the given builder is
null or empty. |
static void |
removeAll(StringBuilder builder,
char character)
Removes all occurrences of the given character from the given builder.
|
static void |
removeAll(StringBuilder builder,
String string)
Removes all occurrences of the given string from the given builder.
|
static void |
replaceAll(StringBuilder builder,
char character,
char replacement)
Replaces all occurrences of the given character in the given builder with the given replacement.
|
static void |
replaceAll(StringBuilder builder,
String string,
String replacement)
Replaces all occurrences of the given string in the given builder with the given replacement.
|
static void |
toLowerCase(StringBuilder builder)
Converts the contents of the given builder to lower case in a locale-insensitive way.
|
static void |
toUpperCase(StringBuilder builder)
Converts the contents of the given builder to upper case in a locale-insensitive way.
|
public static void clear(StringBuilder builder)
IllegalArgumentException - if builder is nullpublic static boolean isNullOrEmpty(StringBuilder builder)
null or empty.public static void removeAll(StringBuilder builder, char character)
IllegalArgumentException - if builder is nullpublic static void removeAll(StringBuilder builder, String string)
IllegalArgumentException - if builder is nullIllegalArgumentException - if string is null or emptypublic static void replaceAll(StringBuilder builder, char character, char replacement)
IllegalArgumentException - if builder is nullpublic static void replaceAll(StringBuilder builder, String string, String replacement)
IllegalArgumentException - if builder is nullIllegalArgumentException - if string is null or emptypublic static void toLowerCase(StringBuilder builder)
IllegalArgumentException - if builder is nullpublic static void toUpperCase(StringBuilder builder)
IllegalArgumentException - if builder is null