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

Decodes a base62 byte slice or an equivalent, like a String, using the alternative digit ordering (0 to 9, then a to z, then A to Z) with lowercase letters before uppercase letters.

Returns a Result containing the decoded u128 or a DecodeError.

Examples

extern crate base62;

let value = base62::decode_alternative("rustlang").unwrap();
assert_eq!(value, 96813686712946);