public class StringUtils
extends java.lang.Object
Constructor and Description |
---|
StringUtils() |
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
capitalizeFirstLetter(java.lang.String data) |
static java.lang.String |
replace(java.lang.String text,
java.lang.String repl,
java.lang.String with)
Replace all occurances of a String within another String.
|
static java.lang.String |
replace(java.lang.String text,
java.lang.String repl,
java.lang.String with,
int max)
Replace a String with another String inside a larger String,
for the first
max values of the search String. |
public static java.lang.String replace(java.lang.String text, java.lang.String repl, java.lang.String with)
Replace all occurances of a String within another String.
A null
reference passed to this method is a no-op.
text
- text to search and replace inrepl
- String to search forwith
- String to replace withreplace(String text, String repl, String with, int max)
public static java.lang.String replace(java.lang.String text, java.lang.String repl, java.lang.String with, int max)
Replace a String with another String inside a larger String,
for the first max
values of the search String.
A null
reference passed to this method is a no-op.
text
- text to search and replace inrepl
- String to search forwith
- String to replace withmax
- maximum number of values to replace, or -1
if no maximumpublic static java.lang.String capitalizeFirstLetter(java.lang.String data)