Skip to content

Instantly share code, notes, and snippets.

@gering
Created March 21, 2018 10:02
Show Gist options
  • Save gering/60e321e7eee31c3712df9ed0c560e2aa to your computer and use it in GitHub Desktop.
Save gering/60e321e7eee31c3712df9ed0c560e2aa to your computer and use it in GitHub Desktop.
Remove chars from a string
function stripchars(str, chrs)
local s = str:gsub("["..chrs:gsub("%W","%%%1").."]", '')
return s
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment