Function isHexOrUnicode

  • Checks if a given string is a hexadecimal or unicode.

    Parameters

    • s: string

      The string to be tested.

    Returns boolean

    A boolean value indicating whether the string is a hexadecimal or unicode.

    Remarks

    This function uses a regular expression to test if the input string is a hexadecimal or unicode.

    Example

    isHexOrUnicode('0x123');
    //=> true
    isHexOrUnicode('u123');
    //=> true
    isHexOrUnicode('123');
    //=> false

Generated using TypeDoc