LUA getting values from table by using a string
snippet in lua

LUA getting values from table by using a string

user7753

s="1ABC3z9"

t=s:gsub(".",function (x)
    local y=tonumber(x)
    if y~=nil then
        y=NumberDef[y]
    else
        y=TextDef[x:lower()]
    end
    return (y or x).." "
end)

print(t)