Class StringUtils

java.lang.Object
org.jobrunr.utils.StringUtils

public class StringUtils extends Object
  • Method Details

    • isNullOrEmpty

      public static boolean isNullOrEmpty(String s)
    • isNotNullOrEmpty

      public static boolean isNotNullOrEmpty(String s)
    • isNullEmptyOrBlank

      public static boolean isNullEmptyOrBlank(String s)
    • capitalize

      public static String capitalize(String s)
    • substringBefore

      public static String substringBefore(String s, String splitter)
    • substringAfter

      public static String substringAfter(String s, String splitter)
    • substringBeforeLast

      public static String substringBeforeLast(String s, String splitter)
    • substringAfterLast

      public static String substringAfterLast(String s, String splitter)
    • substringBetween

      public static String substringBetween(String s, String open, String close)
    • lastMatchedSubstringBetween

      public static String lastMatchedSubstringBetween(String s, String open, String close)
      Returns the last matched String between the given open and close String.
      Parameters:
      s - the String containing the substring, may be null
      open - the String before the substring, may not be null
      close - the String after the substring, may not be null
      Returns:
      Returns the last matched String between the given open and close String when possible or null.
    • lenientSubstringBetween

      public static String lenientSubstringBetween(String s, String open, String close)
      Returns the String between the given open and close String. If the closing String is not present, it will return everything after the opening String.
      Parameters:
      s - the String containing the substring, may be null
      open - the String before the substring, may not be null
      close - the String after the substring, may not be null
      Returns:
      Returns the String between the given open and close String when possible or everything after the opening String.
    • md5Checksum

      public static String md5Checksum(String input)
    • urlEncode

      public static String urlEncode(String string)