Module:string utilities: Revision history

Diff selection: Mark the radio buttons of the revisions to compare and hit enter or the button at the bottom.
Legend: (cur) = difference with latest revision, (prev) = difference with preceding revision, m = minor edit.

11 February 2023

  • curprev 21:4021:40, 11 February 2023Jācōbus talk contribs 8,973 bytes +8,973 Created page with "local module_name = "string_utilities" local export = {} local rfind = mw.ustring.find local format_escapes = { ["op"] = "{", ["cl"] = "}", } function export.format_fun(str, fun) return (string.gsub(str, "{(\\?)((\\?)[^{}]*)}", function (p1, name, p2) if #p1 + #p2 == 1 then return format_escapes[name] or error(module_name .. ".format: unrecognized escape sequence '{\\" .. name .. "}'") else if fun(name) and type(fun(nam..."