expand_number (3) Linux Manual Page
NAME
expand_number – format a number from human readable form
LIBRARY
Lb libbsd
SYNOPSIS
In bsd/libutil.h Ft int Fo expand_number Fa const char *buf uint64_t *num Fc
DESCRIPTION
The Fn expand_number function unformats the Fa buf string and stores a unsigned 64-bit quantity at address pointed out by the Fa num argument.
The Fn expand_number function follows the SI power of two convention.
The prefixes are:
Prefix TaDescription TaMultiplierk Takilo Ta1024M Tamega Ta1048576G Tagiga Ta1073741824T Tatera Ta1099511627776P Tapeta Ta1125899906842624E Taexa Ta1152921504606846976
RETURN VALUES
Rv -std
ERRORS
The Fn expand_number function will fail if:
BqEr EINVAL- The given string contains no digits.
BqEr EINVAL- An unrecognized prefix was given.
BqEr ERANGE- Result doesn’t fit into 64 bits.
SEE ALSO
humanize_number3
HISTORY
The Fn expand_number function first appeared in Fx 6.3 .
