[Overview][Constants][Types][Procedures and functions] Reference for unit 'strutils' (#rtl)

Hex2Dec

Converts a hexadecimal string to a decimal value

Declaration

Source position: strutils.pp line 164

function Hex2Dec(

  const S: String

):LongInt;

Arguments

S

  

String to convert

Function result

Hexadecimal value of the string

Description

Hex2Decconverts the hexadecimal value in the string Sto its decimal value. Unlike the standard Valor StrToIntfunctions, there need not be a $ sign in front of the hexadecimal value to indicate that it is indeed a hexadecimal value.

Errors

If Sdoes not contain a valid hexadecimal value, an EConvertErrorexception will be raised.

See also

Dec2Numb

  

Convert a decimal number to a string representation, using given a base.

IntToBin

  

Converts an integer to a binary string representation, inserting spaces at fixed locations.

intToRoman

  

Represent an integer with roman numerals

RomanToInt

  

Convert a string with a Roman number to it's decimal value.