RandomString

The FireflyAIO Lua API includes a RandomString function that generates a random string composed of uppercase letters and numbers. The length of the string is determined by the argument provided.

Generating a Random String

To generate a random string, use the RandomString function and specify the desired length as an argument.

Here is an example:

-- Generate a random string of length 12
local randomStr = RandomString(12)

This function call RandomString(12) will return a string that is 12 characters long, consisting of random uppercase letters and numbers.

For example, it might generate a string like "A7B3C8D9E0F1".

Using the RandomString function is useful for creating unique identifiers, passwords, or any other scenario where a random combination of uppercase letters and numbers is required.

Last updated