Module:string utilities: Revision history

Jump to navigation Jump to search

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.

20 February 2024

  • curprev 21:1421:14, 20 February 2024Maria talk contribs 25,952 bytes +25,952 Created page with "local gmatch = string.gmatch local module_name = "string_utilities" local export = {} local format_escapes = { ["op"] = "{", ["cl"] = "}", } function export.format_fun(str, fun) return (str:gsub("{(\\?)((\\?)[^{}]*)}", 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(name)) ~= "string" then error(module_name ...."