4,236
edits
(Still futzing) |
(Still futzing) |
||
Line 4:
local p = {}
-- Function to parse the line and return a Lua native data structure
function p.parse_prefs_line(line)
if not line or line == '' then
return {}
end
local qty, prefs = tostring(line):match('(%d+):%s*(.*)')
local prefs_table = {}
Line 19 ⟶ 18:
local rank = 1
if 1 == 1 then
return tostring(prefs)
end
for name, rating in prefs:gmatch('([^/]+)/([^ ]+)') do
prefs_table[rank] = {
|