string.string.random
Declaration
lua
string.random(pool, count)
Description
Generate random string from character pool using arc4random_uniform.
Parameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
pool | string | Required | — | Character pool |
count | integer | Required | — | Number of characters |
Return Values
| Type | Description |
|---|---|
| string | Random string |
Example
lua
string.random("abc123", 8)