Crate nanoid_dictionary
source · [−]Expand description
Popular alphabets for use with nanoid::nanoid!()
macro
use nanoid_dictionary::NOLOOKALIKES;
use nanoid::nanoid;
let id = nanoid!(21, NOLOOKALIKES);
assert_eq!(id.len(), 21);
println!("{}", id);
Constants
Standard NanoId alphabet (64 symbols) English lowercase letters, uppercase letters, digits, and symbols ‘_’ and ‘-’.
Combination of all the lowercase, uppercase characters and numbers from 0 to 9 Does not include any symbols or special characters
Combination of all the lowercase characters and numbers from 0 to 9 Does not include any symbols or special characters
Combination of all the uppercase characters and numbers from 0 to 9 Does not include any symbols or special characters
Lowercase English hexadecimal characters: 0123456789abcdef
Uppercase English hexadecimal characters: 0123456789ABCDEF
Lowercase English letters: abcdefghijklmnopqrstuvwxyz
Numbers and english alphabet without lookalikes: 1, l, I, 0, O, o, u, v, 5, S, s, 2, Z. Complete set: 346789ABCDEFGHJKLMNPQRTUVWXYabcdefghijkmnpqrtwxyz
Same as noolookalikes but with removed vowels and following letters: 3, 4, x, X, V. This list should protect you from accidentally getting obscene words in generated strings. Complete set: 6789BCDFGHJKLMNPQRTWbcdfghjkmnpqrtwz
Numbers from 0 to 9
Uppercase English letters: ABCDEFGHIJKLMNOPQRSTUVWXYZ