#base #convert #cli

bin+lib btb

Base to base, a Rust tool to convert numbers between bases

4 releases

Uses old Rust 2015

0.2.0 Sep 13, 2023
0.1.2 Sep 13, 2023
0.1.1 Sep 12, 2023
0.1.0 Sep 12, 2023

#83 in #base

GPL-3.0 license

17KB
144 lines

base-to-base

base-to-base is a little Rust program to convert numbers between bases.

It aims to be as quick to use as possible.

Install

You'll need cargo for this.

cargo install btb

This will place btb in ~/.cargo/bin. Make sure it's in your PATH.

Usage

btb <Base> <Number> [...args]`

Base is the base of the input Number. It can be any of the following values:

hex x
dec d
oct o
bin b

Args

--to <Base>: output just one base in plaintext

Dependencies

~1.1–1.7MB
~31K SLoC