number-based 0.2.3

number-based is an attempt of mine to make working with number bases simple.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use number_based::{iBase, NumberBase};

fn main() {
    // create the iBase instances
    let number1 = iBase::from_string(30000, "-ð䧈炙㞈榻");
    assert_eq!(number1.as_decimal(), -120387517860123746975);

    let number2 = iBase::from_string(30000, "20");
    assert_eq!(number2.as_decimal(), 60000);

    // divide the numbers
    let quotient = number1 / number2;
    // other operations such as addition, subtraction, and multiplication are also available with
    // the operators "+", "-", and "*" respectively

    assert_eq!(quotient.display(), String::from("-¦┒㡺嚊"));
    assert_eq!(quotient.as_decimal(), -120387517860123746975 / 60000);
}