Skip to content

Instantly share code, notes, and snippets.

@iwanbk
Created April 29, 2013 03:39
Show Gist options
  • Save iwanbk/5479582 to your computer and use it in GitHub Desktop.
Save iwanbk/5479582 to your computer and use it in GitHub Desktop.
Split string by line in Lua
for line in yourString:gmatch("([^\n]*)\n?") do
-- do something
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment