randomizer v1.0.0 Randomizer
Random string generator
Link to this section Summary
Functions
Generates a string based on random characters of a given length
Link to this section Functions
Link to this function
generate!(length, type \\ :all)
Generates a string based on random characters of a given length
Options
:all
- random string letters and numbers:alpha
- random string of letters:downcase
- random string of lowercase non-numeric characters:numeric
- numeric random string:upcase
- upper case non-numeric random string
Example
iex> Randomizer.generate!(20) “PEeAPSFmEIxJDVeN8ioH”
iex> Randomizer.generate!(15, :alpha) “PEbDWKRCKJVWkfp”
iex> Randomizer.generate!(30, :downcase) “nqvvrbvkhciwzfbcocysvbdiyrcqyd”
iex> Randomizer.generate!(10, :numeric) “7721725515”
iex> Randomizer.generate!(25, :upcase) “CZAIDPFTRZNGNKETOZCJNUCRUTXTYX”