Capy-Bearer Documentation

u16

lib call

Capy

function u16(value : as string, opt : dval = {}) u16

u16() parses text in the range 0 through 65535. Invalid, negative, or out-of-range text returns opt.fallback. The default fallback is 0.

Parameters

value : scalar value or text to convert

opt : options map with fallback and base

Return Values

An unsigned 16-bit integer, or opt.fallback.

Example

Capy

print(u16("ffff", {base: 16}), "\n")