string.char
Example
Prints a string consisting of the bytes 72, 101, 108, 108, 111
Output:
Hello
Example
Helper function to create a random string.
function string.Random( length )
local length = tonumber( length )
if length < 1 then return end
local result = {} -- The empty table we start with
for i = 1, length do
result[i] = string.char( math.random(32, 126) )
end
return table.concat(result)
end
print( string.Random( 10 ) )
Output:
oEjkv2?h:T