-
Notifications
You must be signed in to change notification settings - Fork 112
sanitize_lua
wpferguson edited this page Jun 14, 2020
·
1 revision
sanitize_lua
escape lua 'magic' characters from a pattern string
local ds = require "lib/dtutils.string"
local result = ds.sanitize_lua(str)
str - string - the string that needs to be made safe
sanitize_lua escapes lua 'magic' characters so that a string may be used in lua string/patten matching.
result - string - a lua pattern safe string