Function ishex

  • function to check if a string is a hexadecimal string

    Parameters

    • h: string

      hexadecimal string

    Returns boolean

    checking result

    Example

    ishex("12ab") -> true
    ishex( "2ab") -> false
    ishex("12zz") -> false