parameters: (d)
docstring: Get the integer value of a string.
  
      :Parameters:
          - `d`: alphanumeric/hex string
  
      :Returns: integer
  
      Hex strings should be preceded with '0x'.
docstring_summary: Get the integer value of a string.
docstring_tokens: Get the integer value of a string .
function: def hex2int(d):
      """Get the integer value of a string.
  
      :Parameters:
          - `d`: alphanumeric/hex string
  
      :Returns: integer
  
      Hex strings should be preceded with '0x'.
      """
      try:
          return int(d)
  
      except ValueError:
  
          if d[:2] in ['0x', '0X']:
              return str2int(hex2str(d[2:]))
  
          raise
function_tokens: def hex2int ( d ) : try : return int ( d ) except ValueError : if d [ : 2 ] in [ '0x' , '0X' ] : return str2int ( hex2str ( d [ 2 : ] ) ) raise