Skip to content

Instantly share code, notes, and snippets.

@ram-nadella
Created January 19, 2016 22:40
Show Gist options
  • Save ram-nadella/dd067dfeb3c798299e8d to your computer and use it in GitHub Desktop.
Save ram-nadella/dd067dfeb3c798299e8d to your computer and use it in GitHub Desktop.
Trim a lua string
function trim(s)
return (string.gsub(s, "^%s*(.-)%s*$", "%1"))
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment