based

Crates.iobased
lib.rsbased
version1.0.0
sourcesrc
created_at2020-03-29 00:14:49.907096
updated_at2020-05-30 19:51:07.34581
descriptionCustom numeral systems
homepage
repositoryhttps://github.com/Yam76/based
max_upload_size
id223925
size11,463
(Yam76)

documentation

README

Documentation Crate

based

based provides support for custom numerical bases. based does not support multi-character digits.

Example

use based::{Base, NumeralSystem};

let base16: Base = "0123456789abcdef".parse().unwrap();
let val: usize = base16.decode("10").unwrap();
assert_eq!(val, 16);
assert_eq!(base16.encode(16 as usize).unwrap(), "10")
Commit count: 38

cargo fmt