[proposal] table.gsub/table.gmatch/table.find/etc

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[proposal] table.gsub/table.gmatch/table.find/etc

Soni "They/Them" L.
How hard would it be to convert the existing string matching features
for use with tables?

E.g.

table.find({"hello", "world"}, {"world"}, 1, true) --> 2
table.match({"hello", "cruel", "world"}, {table.caret, table.percent.b,
"hello", "world", table.dollar}) --> {"hello", "cruel", "world"}
table.gsub({"a", "world"}, {table.percent.A}, {"bad", "place"}) -->
{"a", "bad", "place"}, 1