[][src]Crate intspector

Functions

add_spacers

Adds spacer characters to a string.

ascii

If value is a valid ASCII code, returns a string representation - either the character itself or a description if the character is in the unprintable range.

bin_string

Converts an integer into a binary string, showing the specified number of low-order bits.

min_bits

Returns the minimum number of bits required to represent the integer. For positive input, gives the number of unsigned bits. For negative input, gives the number of two's complement bits.

parse_int

Attempts to parse the string as a binary, octal, decimal, or hex integer.

std_bits

Returns the output from min_bits() rounded up to a standard integer size - either 8, 16, 32, or 64 bits.

twos_complement

Returns the n-bit two's complement of value. Will panic if n > 64 or value >= 2^n.