RandomTools Flavor: string
describe a random string
Calling Sequence
Parameters
Description
Examples
Compatibility
string(n)
string(n, alphabet)
n
-
non-negative integer, or flavor describing a non-negative integer
alphabet
string, or symbol indicating an alphabet
The flavor string(n) describes a string of length n. The flavor string(n, alphabet) describes a string of length n, where the characters are selected from the given alphabet.
Maple generates the string by calling StringTools[Random]. That help page describes how the optional alphabet parameter is interpreted. The default alphabet is print.
This flavor can be used as an argument to RandomTools[Generate] or as part of a structured flavor.
Generate a string of 30 characters.
Generate a list of 10 strings, each of a length between five and 15, and consisting of alphanumeric characters.
The RandomTools Flavor: string command was updated in Maple 2019.
The n and alphabet parameters were introduced in Maple 2019.
For more information on Maple 2019 changes, see Updates in Maple 2019.
See Also
flavor/structured
rand
RandomTools
RandomTools[Generate]
string
StringTools[Random]
Download Help Document