@batpb/genart - v2.0.0-rc.3-alpha.0
    Preparing search index...

    Class StringValidator

    StringValidator provides static methods that can be used to verify that strings contain specified patterns.

    2.0.0

    Index

    Constructors

    Methods

    Constructors

    • Returns StringValidator

      • StringValidator is a static class and cannot be instantiated.

    Methods

    • Is the given string a hex color string?

      Parameters

      • hex: string

        string to check for the hex color pattern

      • OptionalwithAlpha: boolean

        When true the string will be checked for a #RRGGBBAA pattern. When false, the given string will be checked for a #RRGGBB pattern.

      Returns boolean

      2.0.0

    • Is the given string a hex color string with an alpha component (#RRGGBBAA)?

      Parameters

      • hex: string

        string to check for the hex color pattern.

      Returns boolean

      2.0.0