Class StringUtils

java.lang.Object
me.yleoft.zAPI.utils.StringUtils

public abstract class StringUtils extends Object
  • Constructor Details

    • StringUtils

      public StringUtils()
  • Method Details

    • startsWithIgnoreCase

      public static boolean startsWithIgnoreCase(String full, String prefix)
    • transform

      public static String transform(@Nullable @Nullable org.bukkit.OfflinePlayer p, @NotNull @NotNull String string)
      Transform a string by applying color codes, hex codes and placeholders.
      Parameters:
      p - The player to apply placeholders for
      string - The string to transform
      Returns:
      The transformed string
    • transform

      public static String transform(@NotNull @NotNull String string)
      Transform a string by applying color codes and hex codes.
      Parameters:
      string - The string to transform
      Returns:
      The transformed string
    • applyPlaceholders

      public static String applyPlaceholders(@Nullable @Nullable org.bukkit.OfflinePlayer p, @NotNull @NotNull String string)
      Apply placeholders to a string for a specific player.
      Parameters:
      p - The player to apply placeholders for
      string - The string to apply placeholders to
      Returns:
      The string with placeholders applied
    • applyOwnPlaceholders

      public static String applyOwnPlaceholders(@Nullable @Nullable org.bukkit.OfflinePlayer p, @NotNull @NotNull String string)
      Apply placeholders to a string for a specific player using your own placeholder expansion.
      Parameters:
      p - The player to apply placeholders for
      string - The string to apply placeholders to
      Returns:
      The string with placeholders applied
    • color

      public static String color(@NotNull @NotNull String string)
      Apply color codes to a string.
      Parameters:
      string - The string to apply color codes to
      Returns:
      The string with color codes applied
    • hex

      public static String hex(@NotNull @NotNull String string)
      Apply hex color codes to a string.
      Parameters:
      string - The string to apply hex color codes to
      Returns:
      The string with hex color codes applied