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