Class StringUtil

java.lang.Object
org.leralix.lib.utils.StringUtil

public class StringUtil extends Object
Utility class for handling strings
  • Method Details

    • isValidColorCode

      public static boolean isValidColorCode(String colorCode)
      Check if a string is a valid hex color code (ex: 00FF00 for green)
      Parameters:
      colorCode - The color code to check
      Returns:
      True if the color code is a valid color, false otherwise
    • hexColorToInt

      public static int hexColorToInt(String hexColor)
      Convert a hex color code to an integer
      Parameters:
      hexColor - The hex color code to convert
      Returns:
      The integer representation of the hex color code
    • randomColor

      public static int randomColor()