Comparison

util/uuid.lua @ 762:5ae018c016ba

util.uuid: Return a string, not a number. Looked so innocent.
author Matthew Wild <mwild1@gmail.com>
date Sun, 01 Feb 2009 02:17:56 +0000
parent 760:90ce865eebd8
child 896:2c0b9e3c11c3
comparison
equal deleted inserted replaced
761:67ec69001fd7 762:5ae018c016ba
7 -- 7 --
8 8
9 9
10 10
11 local m_random = math.random; 11 local m_random = math.random;
12 local tostring = tostring;
12 module "uuid" 13 module "uuid"
13 14
14 function generate() 15 function generate()
15 return m_random(0, 99999999); 16 return tostring(m_random(0, 99999999));
16 end 17 end
17 18
18 return _M; 19 return _M;