Package org.leralix.lib.utils
Class StringUtil
java.lang.Object
org.leralix.lib.utils.StringUtil
Utility class for handling strings
-
Method Summary
Modifier and TypeMethodDescriptionstatic int
hexColorToInt
(String hexColor) Convert a hex color code to an integerstatic boolean
isValidColorCode
(String colorCode) Check if a string is a valid hex color code (ex: 00FF00 for green)static int
-
Method Details
-
isValidColorCode
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
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()
-