random.string

Generates a random string.

Note

The result is generated using the cryptographically secure random number generator.

Syntax

string(length, alphabet?)

Parameters

Return value

A random string.

Example

random.string(10)
"n6McPqrPH4"
random.string(3, "🏎️🏍️🚲🚃✈️🚀🚢")
"🚲🚀🚲"