[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: finding keys in a table
- From: Mike Pall <mikelu-0802@...>
- Date: Thu, 21 Feb 2008 16:28:24 +0100
local t = setmetatable({}, { __index = function() return 0 end })
for c in string.gmatch(io.read("*a"), ".") do t[c] = t[c] + 1 end
table.foreach(t, print)
--Mike