lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Probably you would be better served just turning them into (carefully ordered) arrays, then.

Either two arrays (say, Keys and Values) that you iterate in parallel or
interleave them (if you want to keep related things next to one another) like

tSubs = {
     "---", "—", -- em dash
     "--", "–",   -- en dash
 -- etc.

for i = 1, #tSubs, 2 do
  local k, v = tSubs[i], tSubs[i + 1]
 
-- do stuff