isHex

Checks whether str is a hex string (contains only valid hex digits), optionally with radix specifier ("0x").

  1. bool isHex(cstring str, bool allow_radix)
    bool
    isHex
    (,
    bool allow_radix = false
    )
  2. bool isHex(char c)

Parameters

str cstring

string to check

allow_radix bool

if true, the radix specified "0x" is allowed at the start of str

Return Value

Type: bool

true if str is a hex string

Meta