RzNum#

class RzNum#
property callback: CFunction[[RzNum, str, int], int]#
property cb_from_value: CFunction[[RzNum, int, int], str]#
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 cos() float#

Calls function rz_num_cos (defined in unum.c)

static dup() Any#

Calls function rz_num_dup (defined in unum.c)

static irand() None#

Calls function rz_num_irand (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 is_op() bool#

Calls function rz_num_is_op (defined in unum.c)

static minmax_swap(b: int) None#

Calls function rz_num_minmax_swap (defined in unum.c)

static minmax_swap_i(b: int) None#

Calls function rz_num_minmax_swap_i (defined in unum.c)

static new(cb2: RzNumCallback2, ptr: Any) RzNum#

Calls function rz_num_new (defined in unum.c)

static rand() int#

Calls function rz_num_rand (defined in unum.c)

static sin() float#

Calls function rz_num_sin (defined in unum.c)

static str_len() int#

Calls function rz_num_str_len (defined in unum.c)

static str_split() int#

Calls function rz_num_str_split (defined in unum.c)

static str_split_list() RzList[char]#

Calls function rz_num_str_split_list (defined in unum.c)

static to_bits(num: int) int#

Calls function rz_num_to_bits (defined in unum.c)

static to_trits(num: int) int#

Calls function rz_num_to_trits (defined in unum.c)

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.

as_string(n: int, printable_only: bool) str#

Calls function rz_num_as_string (defined in unum.c)

base_of_string(str: str) size_t#

Calls function rz_num_base_of_string (defined in unum.c)

Convert the base suffix to the numeric value.

between(input_value: str) int#

Calls function rz_num_between (defined in unum.c)

calc(str: str, err: Pointer[Pointer[int]]) int#

Calls function rz_num_calc (defined in calc.c)

calc_index(p: str) str#

Calls function rz_num_calc_index (defined in calc.c)

conditional(str: str) int#

Calls function rz_num_conditional (defined in unum.c)

free() None#

Calls function rz_num_free (defined in unum.c)

get(str: str) int#

Calls function rz_num_get (defined in unum.c)

get_float(str: str) float#

Calls function rz_num_get_float (defined in unum.c)

get_input_value(input_value: str) int#

Calls function rz_num_get_input_value (defined in unum.c)

get_name(n: int) str#

Calls function rz_num_get_name (defined in unum.c)

is_valid_input(input_value: str) int#

Calls function rz_num_is_valid_input (defined in unum.c)

math(str: str) int#

Calls function rz_num_math (defined in unum.c)

tail(addr: int, hex: str) int#

Calls function rz_num_tail (defined in unum.c)

tail_base(addr: int, off: int) int#

Calls function rz_num_tail_base (defined in unum.c)