Class StrHelper

java.lang.Object
dev.ftb.plugins.ashwing.utils.StrHelper

public class StrHelper extends Object
  • Constructor Details

    • StrHelper

      public StrHelper()
  • Method Details

    • isNullOrEmpty

      public static boolean isNullOrEmpty(@Nullable String str)
      Checks if a string is null or empty.
      Parameters:
      str - The string to check.
      Returns:
      True if the string is null or empty, false otherwise.
    • toTitleCase

      public static String toTitleCase(String str)
      Converts a string to title case.
      Parameters:
      str - The string to convert.
      Returns:
      The string in title case.
    • toSafeCase

      public static String toSafeCase(String str)
      Converts a string to a safe case for URLs or filenames. Replaces all non-alphanumeric characters with hyphens and converts to lowercase.
      Parameters:
      str - The string to convert.
      Returns:
      The string in safe case.