Skip to content
wpferguson edited this page Jun 14, 2020 · 1 revision

SANITIZE_LUA

NAME

sanitize_lua

SYNOPSIS

escape lua 'magic' characters from a pattern string

USAGE

local ds = require "lib/dtutils.string"
local result = ds.sanitize_lua(str)

str - string - the string that needs to be made safe

DESCRIPTION

sanitize_lua escapes lua 'magic' characters so that a string may be used in lua string/patten matching.

RETURN VALUE

result - string - a lua pattern safe string

Clone this wiki locally