Class StringHelper
java.lang.Object
com.github.thought2code.mcp.annotated.util.StringHelper
Helper class for string operations.
- Author:
- codeboyzhou
-
Field Summary
Fields -
Method Summary
-
Field Details
-
EMPTY
The empty string constant.- See Also:
-
DOT
The dot character constant.- See Also:
-
SPACE
The space character constant.- See Also:
-
-
Method Details
-
isBlank
Checks if the given string is blank.- Parameters:
str- the string to check- Returns:
trueif the string is blank,falseotherwise
-
defaultIfBlank
Returns the default value if the given string is blank, otherwise returns the original string.- Parameters:
str- the string to checkdefaultValue- the default value to return if the string is blank- Returns:
- the original string if it is not blank, otherwise the default value
-