Crates.io | base62num |
lib.rs | base62num |
version | 0.1.1 |
source | src |
created_at | 2020-09-13 13:52:36.580894 |
updated_at | 2020-09-13 14:16:54.735934 |
description | A convertor between numbers and strings in Base62. |
homepage | |
repository | https://github.com/jtr109/base62num |
max_upload_size | |
id | 288186 |
size | 8,752 |
A convertor between numbers and strings in Base62.
This library using the Base62 index table on Wikipedia, which is in the order of "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789" that familiar with Base64.
Using the crate as a dependency.
[dependencies]
base62num = "0.1"
use base62num::encode;
assert_eq!(encode(123), "B9");
use base62num::decode;
assert_eq!(decode("B9"), Some(123));
base62num
is under the MIT license.