Class DoxiaStringUtils
java.lang.Object
org.apache.maven.doxia.util.DoxiaStringUtils
Utility methods for string operations.
This class provides methods that were previously supplied by Apache Commons Lang3.
- Since:
- 2.1.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic intcountMatches(String str, String sub) Counts how many times the substring appears in the larger string.static booleanisAllBlank(String... strs) Checks if all strings are blank.static booleanChecks if a string is blank (null, empty, or whitespace only).static booleanisNotEmpty(String str) Checks if a string is not empty.static StringRemoves a substring only if it is at the end of a source string.static StringRepeats a string a certain number of times.static StringReplaces all occurrences of a string within another string.static String[]Splits a string by specified delimiters.static StringstripStart(String str, String stripChars) Strips any of a set of characters from the start of a string.
-
Constructor Details
-
DoxiaStringUtils
private DoxiaStringUtils()
-
-
Method Details
-
repeat
-
replace
Replaces all occurrences of a string within another string.- Parameters:
text- the text to search and replace insearchString- the string to search forreplacement- the string to replace with- Returns:
- the text with any replacements processed
-
isNotEmpty
Checks if a string is not empty.- Parameters:
str- the string to check- Returns:
- true if the string is not null and not empty
-
isBlank
Checks if a string is blank (null, empty, or whitespace only).- Parameters:
str- the string to check- Returns:
- true if the string is null, empty, or whitespace only
-
isAllBlank
Checks if all strings are blank.- Parameters:
strs- the strings to check- Returns:
- true if all strings are blank
-
split
-
removeEnd
-
stripStart
-
countMatches
-