Shared
lib.string
Extends the standard Lua string table with extra functions.
string = lib.stringstring.random
Outputs a random string based on a given pattern.
string.random(pattern, length)- pattern:
string 1will output a random number from 0-9.Awill output a random letter from A-Z.awill output a random letter from a-z..will output a random letter or number.^will output the following character literally.- Any other character will output said character.
- length?:
number- Sets the length of the returned string, either padding it or omitting characters.
Return:
- string:
string