问题
I tried to find the whole string in a table without writing the full string.
Example:
maintable = {"SecondString", "FirstString"}
c = "First"
How would I be able to use string c
to find the whole name of FirstString without typing the whole string name?
回答1:
You have to search the table:
for k,v in pairs(maintable) do
if v:match(c) then print(k,v) end
end
来源:https://stackoverflow.com/questions/50952236/find-full-string-using-partial-string-lua