randomword(
WORDLIST
)
The randomword( function returns a random word from a list of words.
Parameters
This function has one parameter:
wordlist – the list of words, with each word separated by a space.
Description
This function returns a random word from a list of words. Each time you use this function a new random word will be returned.
randomword("red green blue gold silver white black") ☞ blue
randomword("red green blue gold silver white black") ☞ silver
randomword("red green blue gold silver white black") ☞ red
randomword("red green blue gold silver white black") ☞ gold
See Also
- after( -- extracts all text after a specified tag (sequence of characters).
- before( -- extracts all text before a specified tag (sequence of characters). If the tag doesn't exist the function returns "".
- extract( -- extracts a single data item from a text array, and can also be used to count the number of items in the array.
- firstline( -- extracts the first line from the text.
- firstword( -- extracts the first word from the text.
- lastline( -- extracts the last line from the text.
- lastword( -- extracts the last word from the text.
- left( -- extracts characters from the left edge of the text.
- nthline( -- extracts the nth line from the text.
- nthword( -- extracts a word from the middle of the text.
- randomline( -- returns a random line from multiple lines of text.
- right( -- extracts characters from the right edge of the text.
- textafter( -- extracts the text after the tag.
- textbefore( -- extracts the text before the tag.
- trim( -- removes characters from the right edge of the text.
- trimleft( -- removes one or more characters from the left edge of the text.
History
10.0 | Updated | Carried over from Panorama 6.0, but is now much faster. |