An integer conversion utility.
Intspector is a command line utility for converting integers between bases. It accepts an integer in binary, octal, decimal, or hex form, then prints it out in all four bases.
Run intspector --help
to view the command line help.
Usage: intspector [integers] Integer conversion utility. Accepts integer input in [b]inary, [o]ctal, [d]ecimal, or he[x]adecimal base, then displays the number in all four bases. Use a single letter prefix to declare the base of the input, e.g. b1010. The base defaults to decimal if no prefix is specified. This utility: - Accepts integer literals with a leading zero, e.g. 0x123. - Accepts multiple arguments. - Accepts input in the signed 64-bit integer range. - Displays the two's complement value for negative integers. Arguments: [integers] List of integers to convert. Options: -b, --bits <n> Number of binary digits to display. (Determines the two's complement value for negative integers.) Flags: -h, --help Print this help text. -v, --version Print the application's version number. Commands: cp2l, codepoint-to-literal Convert unicode codepoints to character literals. l2cp, literal-to-codepoint Convert character literals to unicode code points. Command Help: help <command> Print the specified command's help text.
Intspector is written in Rust — if you have a Rust compiler available you can install directly from the package index using cargo
:
$ cargo install intspector
You can find the source files on Github and the package on crates.io.
Zero-Clause BSD (0BSD).