Cicode Programming Reference > Cicode Function Categories > String Functions Introduction > HexToStr

HexToStr

Converts a number into a hexadecimal string. The string is the width specified (padded with zeros).

Syntax

HexToStr(Number, Width)

Number:

The number to convert.

Width:

The width of the string.

Return Value

A string containing the converted number.

Related Functions

StrToHex, IntToStr

Example

Variable=HexToStr(123, 4);
! Sets Variable to "007b".
Variable = HexToStr(0x12ABFE, 8);
! Sets Variable to "0012abfe"

See Also

String Functions