StringValidator provides static methods that can be used to verify that strings contain specified patterns.
2.0.0
Static
Is the given string a hex color string?
string to check for the hex color pattern
Optional
When true the string will be checked for a #RRGGBBAA pattern. When false, the given string will be checked for a #RRGGBB pattern.
true
#RRGGBBAA
false
#RRGGBB
Is the given string a hex color string with an alpha component (#RRGGBBAA)?
string to check for the hex color pattern.
StringValidator provides static methods that can be used to verify that strings contain specified patterns.
Since
2.0.0