Skip to content

utils.string.random

utils.string.random(length, recurse)
This function gets a random alphanumeric string, with the defined length.

Arguments

Argument Data Type Optional Default Value Explanation
length int No - Define the length
recurse boolean Yes - Force random on each iteration

Dependency

local utils = M("utils")

Example

local str = utils.string.random(9, true)

print(str) -- Returns random string

Improve this documentation