You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Generate a string containing 2 lower case letters followed by 2 digits.
iex>RandomStringGenerator.generate("lldd")"ol68"
Generate a string containing 2 upper case letters.
iex>RandomStringGenerator.generate("LL")"VR"
Generate a string containing 2 punctuations.
iex>RandomStringGenerator.generate("pp")"?!"
Delimiters
Everything that is not l,L,d,p and c is treated as a delimiter so
the pattern -dl? is interpreted as a hyphen followed by a digit followed by
a lower case letter followed by a question mark.
Generate a string containing 2 letters followed by a hyphen.
iex>RandomStringGenerator.generate("ll-")"yz-"
Scape
In order to generate a string containing the characters l,L,d and p
as a delimiter, you need to use the backslash twice in order to scape it.
Generate a string containing 2 digits followed by the letters lLdp.
If no custom char list is passed the with character c it will be treated
as a delimiter as in the example below where it generates a string containing
one digit followed by the letter c followed by another digit
iex>RandomStringGenerator.generate("dcd")"2c1"
Shuffling
In order to generate a string based on a given patter Lldd where those
characters are placed in a random order, the shuffle/1 function should
be used.
Generate a string containing 2 lower case letters, 2 digits in random order.