Class StringHelper

java.lang.Object
com.github.thought2code.mcp.annotated.util.StringHelper

public final class StringHelper extends Object
Helper class for string operations.
Author:
codeboyzhou
  • Field Details

  • Method Details

    • isBlank

      public static boolean isBlank(String str)
      Checks if the given string is blank.
      Parameters:
      str - the string to check
      Returns:
      true if the string is blank, false otherwise
    • defaultIfBlank

      public static String defaultIfBlank(String str, String defaultValue)
      Returns the default value if the given string is blank, otherwise returns the original string.
      Parameters:
      str - the string to check
      defaultValue - the default value to return if the string is blank
      Returns:
      the original string if it is not blank, otherwise the default value