Unit 'sysutils' Package
[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] [#rtl]

StrToUInt

Convert a string to unsigned integer value.

Declaration

Source position: sysstrh.inc line 137

function StrToUInt(

  const s: string

):Cardinal;

Description

StrToUInt will convert the string Sto an unsigned 32-bit integer. If the string contains invalid characters or has an invalid format, then an EConvertError is raised.

To be successfully converted, a string can contain a combination of numerical characters. Spaces are not allowed.

The string S can contain a number in decimal, hexadecimal, binary or octal format, as described in the language reference.

For hexadecimal values, the prefix '0x' or 'x' (case insensitive) may be used as well.

Errors

In case of error, an EConvertError is raised.

See also

UIntToStr

  

Unsigned integer to String.

StrToInt

  

Convert a string to an integer value.

StrToInt64

  

Convert a string to an Int64 value.

StrToUInt64

  

Convert a string to unsigned integer value.

StrToIntDef

  

Convert a string to an integer value, with a default value.

EConvertError

  

Conversion error.


Documentation generated on: Nov 23 2024