This is the documentation page for Module:RNG
basically a few functions that deal with randomness and random text
how 2 random
this module contains five functions, which each generate random strings with different sets of characters:
number- generates a random numberalphabet- generates a random string using only lettersalphanumeric- generates a random string using uppercase and lowercase letters, and numberssymbols- generates a random string using only symbols and punctuationstring- generates a random string using any characters
this module can be called like so:
{{#invoke: RNG | (function name) | (length) | (case (alphabet function only))}}
the alphabet function has an additional parameter, used for determining the case of the letters.
- when
caseis set toupper, letters will always be uppercase. - when
caseis set tolower, letters will always be lowercase. - when
caseis set toboth(or anything else), case will be random.
randomness from this module is cached, meaning the user will have to refresh the page while ignoring cache (ctrl + f5) in order to reroll for new values.
examples
{{#invoke: RNG | number | 6}} will result in a random six digit number:
374955
{{#invoke: RNG | alphabet | 8 | upper}} will result in a random 8 letter string in all caps:
XnQRffnL
{{#invoke: RNG | alphanumeric | 15}} will result in a random 15 character string, with numbers and letters:
Th1j1ZNpp6fg041
{{#invoke: RNG | symbols | 5}} will result in a random 5 character string with only symbols and punctuation:
|/','
{{#invoke: RNG | string | 20}} will result in a Password:
v5{p!9^`9:Y"ab}q70(@