Download the PHP package ngiusti/random-string-generator without Composer
On this page you can find all versions of the php package ngiusti/random-string-generator. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package random-string-generator
RandomStringGenerator
Generates a random string based on a given string pattern
Installation
The package can be used by adding random-string-generator to your list of dependencies in composer.json as following:
Usage
Accepted string patterns:
Use l for lower case letter from a to z
Use L for upper case letter from A to Z
Use d for digit from 0 to 9
Use p for punctuation
Punctuation is any character on the following group:
!, ", #, $, %, &, ', (, ), *, +, ,, -,
., /, :, ;, <, =, >, ?, @, [, \, ], ^,
_, {, |,}, ~ and `
Generate a string containing 2 lower case letters followed by 2 digits.
Generate a string containing 2 upper case letters.
Generate a string containing 2 punctuations.
Delimiters
Apart from l,L,d and p, any other character is considered a delimiter. Therefore, the
pattern -dl? is interpreted as : a hyphen followed by a random digit, followed by
a random lower case letter, followed by a question mark.
Generate a string containing 2 letters followed by a hyphen.
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.