Class StringUtil

java.lang.Object
net.guizhanss.guizhanlib.utils.StringUtil

public final class StringUtil extends Object
Utility methods about String.
Author:
ybw0014
  • Constructor Details

    • StringUtil

      public StringUtil()
  • Method Details

    • humanize

      @Nonnull public static String humanize(@Nonnull String str)
      Make the string readable.
      Parameters:
      str - The original String.
      Returns:
      Readable String.
    • dehumanize

      @Nonnull public static String dehumanize(@Nonnull String str)
      Make string to uppercase format and replace hyphen and spaces to underscore.
      Parameters:
      str - The original String.
      Returns:
      Readable string.
    • capitalize

      @Nonnull public static String capitalize(@Nonnull String str)
      Capitalize each word in the String. DOES NOT lower case other letters in a word.
      Parameters:
      str - The original String.
      Returns:
      Capitalized String.
    • isBlank

      public static boolean isBlank(@Nullable String str)
      Check if given String is blank.
      Parameters:
      str - The String to be checked.
      Returns:
      If the String is blank.