Returns a random v4 UUID of the form xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx
, where each x
is replaced with a random hexadecimal digit from 0 to f, and y
is replaced with a random hexadecimal digit from 8 to b.
Instance, based on recursion, can be found here.
I really want to know why
~a%5|a*3&4
matches9 or 14 or 19 or 24
.Anyway, excellent @LeverOne!