Crate b0x[][src]

A simple CLI tool to display information about the provided input.

Installation

$ cargo install b0x

Usage

While you don't see it below, it prints everything in color.

Numbers

Supported formats:

  • Decimal: 42
  • Binary: 0b101010
  • Octal: 0o52
  • Hexadecimal: 0x2A
$ b0x 0xC0FFEE
found u128(12648430)
--> radix
bin 110000001111111111101110
  ├ ones 16
  ├ zeros 8 (112)
  ├ leading zeros 104
  └ trailing zeros 1
oct 60177756
dec 12648430
hex c0ffee
HEX C0FFEE
--> misc
next 2^x 16777216

Strings

$ b0x "TeSt StRiNg"
found string(TeSt StRiNg)
--> structure
ascii? true
--> graphemes
 ["T", "e", "S", "t", " ", "S", "t", "R", "i", "N", "g"]
len 11
--> words
 ["TeSt", "StRiNg"]
len 2
--> bytes
 [84, 101, 83, 116, 32, 83, 116, 82, 105, 78, 103]
len 11
--> modifications
upper TEST STRING
lower test string

Modules

config

Contains utilities for storing configuration

pass

Defines passes

Functions

run

Given a Config, try to parse the input stored in it as a number and print information. If the input can't be parsed as a u128, fall back to String.