Package com.logicaldoc.core.automation
Class StringTool
java.lang.Object
com.logicaldoc.core.automation.StringTool
Utility methods to handle strings
- Since:
- 9.0
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiondefaultString
(String str) Returns either the passed in String, or if the String is null, an empty String ("").defaultString
(String str, String defaultStr) Returns either the passed in String, or if the String is null, the value of defaultStr.
-
Constructor Details
-
StringTool
public StringTool()
-
-
Method Details
-
defaultString
Returns either the passed in String, or if the String is null, an empty String ("").- Parameters:
str
- the String to check, may be null- Returns:
- the passed in String, or the empty String if it was null
-
defaultString
Returns either the passed in String, or if the String is null, the value of defaultStr.- Parameters:
str
- the String to check, may be nulldefaultStr
- the default string to return if the input is empty ("") or null, may be null- Returns:
- the passed in String, or the empty String if it was null
-