Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local function uuid4()
- local random = math.random
- local template ='xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'
- return string.gsub(template, '[xy]', function (c)
- return string.format('%x', c == 'x' and random(0, 0xf) or random(8, 0xb))
- end)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement