Created
March 21, 2018 10:02
-
-
Save gering/60e321e7eee31c3712df9ed0c560e2aa to your computer and use it in GitHub Desktop.
Remove chars from a string
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 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