public class StringUtils
extends java.lang.Object
| Constructor and Description |
|---|
StringUtils() |
| Modifier and Type | Method and Description |
|---|---|
static java.lang.String |
removeEndChar(char c,
java.lang.String s)
Returns a new String resulting from removing the character
c
from the end of the String s. |
static java.lang.String |
removeSquareBloc(java.lang.String s)
Returns a new String resulting from removing anything between the first
occurence of an open bracket [ and a closing bracket ]
found inside the String
s. |
static java.lang.String |
removeStartChar(char c,
java.lang.String s)
Returns a new String resulting from removing the character
c
from the start of the String s. |
static java.lang.String |
removeStartStr(java.lang.String toRemove,
java.lang.String str,
boolean isCaseSensitive)
Returns a new String resulting from removing
toRemove from
the start of the String str. |
public static java.lang.String removeStartStr(java.lang.String toRemove,
java.lang.String str,
boolean isCaseSensitive)
toRemove from
the start of the String str. toRemove is not found at the
start of str. toRemove - a String of characters that we want to remove from the start
of str.str - a String.isCaseSensitive - if set to true, will only remove from the start
of the string if there is a case-sensitive match,false will use a case-insensitive match.toRemove from
the start of the String str.toRemove is not
found at the start of str.public static java.lang.String removeStartChar(char c,
java.lang.String s)
c
from the start of the String s. c is not found
at the start of s. c - a character to remove from the start of String s.s - a String.c
from the start of the String s. c is
not found at the start of s.public static java.lang.String removeEndChar(char c,
java.lang.String s)
c
from the end of the String s. c is not found
at the end of s. c - a character to remove from the end of String s.s - a String.c
from the end of the String s. c is
not found at the end of s.public static java.lang.String removeSquareBloc(java.lang.String s)
s. s - a String.s.