Modul:string/replacementEscape
Tampaian
Dokumentasi untuk modul ini dapat dibuat di Modul:string/replacementEscape/doc
-- Imported from enwiktionary
-- Source: https://en.wiktionary.org/wiki/Module:string/replacementEscape
-- License: CC BY-SA
local gsub = string.gsub
--[==[Escapes {%}, which is the only magic character used in replacement strings, which are given as the third argument to {string.gsub} and {mw.ustring.gsub}, as well as format strings given to {string.format} and {mw.ustring.format}.]==]
return function(str)
return (gsub(str, "%%", "%%%%"))
end