@OpenApiAll
public final class StringUtils
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
LINE_SEPARATOR
A line separator string.
|
Modifier and Type | Method and Description |
---|---|
static java.lang.CharSequence |
leftTrim(java.lang.CharSequence input)
Returns a copy of the string, with leading whitespace omitted.
|
static java.lang.String |
lPad(java.lang.CharSequence src,
char pad,
int length)
Padding a character to left of string.
|
static java.lang.StringBuffer |
replace(java.lang.CharSequence input,
java.lang.String target,
java.lang.String replacement)
Replaces each substring of this string that matches the literal target sequence with the specified literal
replacement sequence.
|
static java.lang.StringBuffer |
replaceAll(java.lang.CharSequence input,
java.lang.String regex,
java.lang.String replacement)
Replaces each substring of this subsequence that matches the given regular expression with the given
replacement.
|
static java.lang.StringBuilder |
replaceBuilder(java.lang.StringBuilder input,
java.lang.String target,
java.lang.String replacement)
Replaces each substring of this string that matches the literal target sequence with the specified literal
replacement sequence.
|
static java.lang.CharSequence |
rightTrim(java.lang.CharSequence input)
Returns a copy of the string, with trailing whitespace omitted.
|
static java.lang.String |
rPad(java.lang.CharSequence src,
char pad,
int length)
Padding a character to right of string.
|
static java.lang.CharSequence |
trim(java.lang.CharSequence input)
Returns a copy of the string, with leading whitespace and trailing whitespace are omitted.
|
public static final java.lang.String LINE_SEPARATOR
line.separator
, and is not necessarily a single newline ('\n') character.public static java.lang.StringBuffer replaceAll(java.lang.CharSequence input, java.lang.String regex, java.lang.String replacement)
input
- The character sequence to be matchedregex
- the regular expression to which this string is to be matchedreplacement
- The replacement stringpublic static java.lang.StringBuffer replace(java.lang.CharSequence input, java.lang.String target, java.lang.String replacement)
input
- The character sequence to be matchedtarget
- The sequence of char values to be replacedreplacement
- The replacement stringpublic static java.lang.StringBuilder replaceBuilder(java.lang.StringBuilder input, java.lang.String target, java.lang.String replacement)
input
- The character sequence to be matchedtarget
- The sequence of char values to be replacedreplacement
- The replacement stringpublic static java.lang.CharSequence leftTrim(java.lang.CharSequence input)
input
- string to be trim.public static java.lang.CharSequence rightTrim(java.lang.CharSequence input)
input
- string to be trim.public static java.lang.CharSequence trim(java.lang.CharSequence input)
input
- string to be trim.public static java.lang.String lPad(java.lang.CharSequence src, char pad, int length)
src
- String to paddingpad
- Pad characterlength
- Final length of stringpublic static java.lang.String rPad(java.lang.CharSequence src, char pad, int length)
src
- String to paddingpad
- Pad characterlength
- Final length of stringCopyright © 2010 - No Magic Asia