Module:Cmap

From Heroes 3 wiki
Revision as of 18:53, 6 January 2024 by Imahero (talk | contribs) (Created page with "local p = {} --p stands for package function p.cmap(frame) return frame.args[1] end")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Returns arg1 with all instances of arg2 replaced with arg3.

Example

{{#invoke:cmap|cmap|needle in haystack|needle|hay}}
Script error: The module returned a nil value. It is supposed to return an export table.

local p = {} --p stands for package

function p.cmap(frame)
	return frame.args[1]
end