pub fn decode<T: AsRef<[u8]>>(input: T) -> Result<u128, DecodeError>
Expand description

Decodes a base62 byte slice or an equivalent, like a String, using the standard digit ordering (0 to 9, then A to Z, then a to z).

Returns a Result containing the decoded u128 or a DecodeError.

Examples

extern crate base62;

let value = base62::decode("rustlang").unwrap();
assert_eq!(value, 189876682536016);