UINT/->STRING

Convert an unsigned integer to string.

Input stack: number

Output stack: string-of-number

INT/->STRING pushes a string representation of given number to the top of the stack.

PumpkinDB> 1024 UINT/->STRING.
"1024"

Allocation

Space for string representation of number will be allocated.

Errors

EmptyStack error if stack is empty.

InvalidValue error if stack value cannot be converted to integer.

Tests

works : 2 UINT/->STRING "2" EQUAL?.
empty_stack : [UINT/->STRING] TRY UNWRAP 0x04 EQUAL?.

results matching ""

    No results matching ""