use number_based::{uBase, NumberBase}; fn main() { // converting down // create uBase instance let mut number = uBase::from_string(7863, "NUMBERBASED"); // convert number to base 10 number.convert(10); assert_eq!( number.display(), String::from("20781774882369576414324066149192513674771") ); // Do aslso note that number.conver(10).display() is equivalent to number.as_decimal() with the // important distinction that as_decimal() returns a u128 and not a string // converting up // create uBase instance let mut other_number = uBase::from_string(10, "120387517860123746975"); // convert number to base 10000 other_number.convert(10000); assert_eq!(other_number.display(), String::from("1ࡒᶹ⇵ঢᮛ")); }