Crate dollnary

Crate dollnary 

Source
Expand description

tiny dollnary implementation

example:

use dollnary;

let encoded = dollnary::encode(0x464383c);
assert_eq!(encoded, String::from("││╽│╽╿╽││┃╿││┃┃│"));

// decoding can fail if the input isn't well-formatted, so it returns an Option
let decoded = dollnary::decode(&encoded);
assert_eq!(decoded, Some(0x464383c));
assert_eq!(dollnary::decode("invalid"), None);

Functions§

decode
parse dollnary into an integer
encode
get dollnary representation of an integer