RzNum#
- class RzNum#
-
- property dbz: int#
- property fvalue: float#
- property nc: RzNumCalc#
- property userptr: Any#
- property value: int#
- static chs(head: int, sector: int, sectorsize: int) int #
Calls function
rz_num_chs
(defined in unum.c)
- static is_hex_prefix() bool #
Calls function
rz_num_is_hex_prefix
(defined in unum.c)Checks if the first two chars of
p
equal “0x”.- Parameters:
p – The string which potentially represents a hex number.
- Returns:
bool True if p[0] == ‘0’ && p[1] == ‘x’. False otherwise.
- static units(len: size_t, number: int) str #
Calls function
rz_num_units
(defined in unum.c)Convert size in bytes to human-readable string
Result is stored in buf (buf should be at least 8 bytes in size). If buf is NULL, memory for the new string is obtained with malloc(3), and can be freed with free(3).
On success, returns a pointer to buf. It returns NULL if insufficient memory was available.