Crate nanoid_dictionary

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§

ALPHABET_STD
Standard NanoId alphabet (64 symbols) English lowercase letters, uppercase letters, digits, and symbols ‘_’ and ‘-’.
ALPHANUMERIC
Combination of all the lowercase, uppercase characters and numbers from 0 to 9 Does not include any symbols or special characters
ALPHANUMERIC_LOWERCASE
Combination of all the lowercase characters and numbers from 0 to 9 Does not include any symbols or special characters
ALPHANUMERIC_UPPERCASE
Combination of all the uppercase characters and numbers from 0 to 9 Does not include any symbols or special characters
HEXADECIMAL_LOWERCASE
Lowercase English hexadecimal characters: 0123456789abcdef
HEXADECIMAL_UPPERCASE
Uppercase English hexadecimal characters: 0123456789ABCDEF
LOWERCASE
Lowercase English letters: abcdefghijklmnopqrstuvwxyz
NOLOOKALIKES
Numbers and english alphabet without lookalikes: 1, l, I, 0, O, o, u, v, 5, S, s, 2, Z. Complete set: 346789ABCDEFGHJKLMNPQRTUVWXYabcdefghijkmnpqrtwxyz
NOLOOKALIKES_SAFE
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
Numbers from 0 to 9
UPPERCASE
Uppercase English letters: ABCDEFGHIJKLMNOPQRSTUVWXYZ