Class StringUtils
java.lang.Object
org.codehaus.plexus.interpolation.util.StringUtils
Code here was swiped from plexus-utils' StringUtils class, so
plexus-interpolation could be completely self-contained.
- Author:
- jdcasey
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic String
capitalizeFirstLetter
(String data) static String
Replace all occurrences of a String within another String.static String
Replace a String with another String inside a larger String, for the firstmax
values of the search String.
-
Constructor Details
-
StringUtils
public StringUtils()
-
-
Method Details
-
replace
Replace all occurrences of a String within another String.
A
null
reference passed to this method is a no-op.- Parameters:
text
- text to search and replace inrepl
- String to search forwith
- String to replace with- Returns:
- the text with any replacements processed
- See Also:
-
replace
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.- Parameters:
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 maximum- Returns:
- the text with any replacements processed
-
capitalizeFirstLetter
-