Even brute force is pretty easy:
n = 20
c = [*?A..?Z + *?0..?9]
size = c.size
n.times.map { c[rand(size)] }.join
#=> "IE210UOTDSJDKM67XCG1"
or, without replacement:
c.sample(n).join
#=> "GN5ZC0HFDCO2G5M47VYW"
should that be desired. (I originally had c = [*(?A..?Z)] + [*(?0..?9)]
, but saw from @sawa's answer that that could be simplified quite a bit.)
Limited Time Only
This item is NOT available in stores.
Guaranteed safe checkout:
PAYPAL | VISA | MASTERCARD
Click BUY IT NOW To Order Yours!