Class StringTool

java.lang.Object
com.logicaldoc.core.automation.StringTool

public class StringTool extends Object
Utility methods to handle strings
Since:
9.0
  • Constructor Details

    • StringTool

      public StringTool()
  • Method Details

    • defaultString

      public String defaultString(String str)
      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

      public String defaultString(String str, String defaultStr)
      Returns either the passed in String, or if the String is null, the value of defaultStr.
      Parameters:
      str - the String to check, may be null
      defaultStr - 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