Package zombie.util

Class StringUtils

java.lang.Object
zombie.util.StringUtils

public class StringUtils extends Object
  • Field Details

  • Constructor Details

    • StringUtils

      public StringUtils()
  • Method Details

    • isNullOrEmpty

      public static boolean isNullOrEmpty(String s)
      Tests the supplied string and return TRUE if it is either NULL or a zero-length string.
      Parameters:
      s - The string to test.
      Returns:
      TRUE if the string is null or empty, FALSE otherwise.
    • isNullOrWhitespace

      public static boolean isNullOrWhitespace(String s)
      Returns TRUE if the supplied string is either NULL, empty, or whitespace.
      Parameters:
      s - The string to test.
      Returns:
      TRUE if the string is either null, or whitespace, FALSE otherwise.
    • discardNullOrWhitespace

      public static String discardNullOrWhitespace(String str)
    • trimPrefix

      public static String trimPrefix(String str, String prefix)
    • trimSuffix

      public static String trimSuffix(String str, String suffix)
    • equals

      public static boolean equals(String a, String b)
    • startsWithIgnoreCase

      public static boolean startsWithIgnoreCase(String str, String prefix)
    • endsWithIgnoreCase

      public static boolean endsWithIgnoreCase(String str, String suffix)
    • containsIgnoreCase

      public static boolean containsIgnoreCase(String haystack, String needle)
    • equalsIgnoreCase

      public static boolean equalsIgnoreCase(String a, String b)
    • tryParseBoolean

      public static boolean tryParseBoolean(String varStr)
    • isBoolean

      public static boolean isBoolean(String varStr)
    • contains

      public static boolean contains(String[] array, String val, BiFunction<String,String,Boolean> equalizer)
    • indexOf

      public static int indexOf(String[] array, String val, BiFunction<String,String,Boolean> equalizer)
    • indent

      public static String indent(String text)
    • leftJustify

      public static String leftJustify(String text, int length)
    • moduleDotType

      public static String moduleDotType(String module, String type)
    • stripBOM

      public static String stripBOM(String line)