Created
July 4, 2015 07:47
-
-
Save qizhihere/cb2a14432d9bf65693ad to your computer and use it in GitHub Desktop.
merge two tables in lua
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function table.merge(t1, t2) | |
for k,v in ipairs(t2) do | |
table.insert(t1, v) | |
end | |
return t1 | |
end |
shaeinst
commented
Apr 2, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment