Skip to main content
Version: v4.23

uint

Casts an expression to an unsigned integer.

uint(x:any) -> uint

Description

The uint function casts the provided value x to an unsigned integer. Non-integer values are truncated.

Examples

Cast a floating-point number to an unsigned integer

from {x: uint(4.2)}
{x: 4}

See Also

int, float, time, str, ip