Skip to content

Instantly share code, notes, and snippets.

View webr0m's full-sized avatar

Webrom webr0m

View GitHub Profile
@webr0m
webr0m / string.random.lua
Created June 18, 2018 11:22 — forked from haggen/string.random.lua
Random strings in Lua
local charset = {}
-- qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM1234567890
for i = 48, 57 do table.insert(charset, string.char(i)) end
for i = 65, 90 do table.insert(charset, string.char(i)) end
for i = 97, 122 do table.insert(charset, string.char(i)) end
function string.random(length)
math.randomseed(os.time())