Expand description
Base utilities for Faker generators
Constants§
- ALPHANUMERIC
- Alphanumeric characters
- DIGITS
- Digits
- HEX_
LOWER - Hex digits lowercase
- HEX_
UPPER - Hex digits uppercase
- LETTERS
- All letters
- L_
LETTERS - Lowercase letters
- U_
LETTERS - Uppercase letters
Functions§
- bothify
- Replace both
#and?in the template - letterify
- Replace
?with random letter - numerify
- Replace
#with random digit,?with random letter By default, the first#is replaced with 1-9 (no leading zero) - parse
- Parse a template with interpolations like “#{first_name} #{last_name}”
- rand_
in_ range - Generate a random number in range [min, max]
- sample
- Sample a random element from a slice
- sample_
many - Sample multiple random elements from a slice (with replacement)