Module:Contains

From Heroes 3 wiki
Jump to navigation Jump to search

Usage[edit | hide]

{{#invoke:contains|value|haystack={{{1|needle in a haystack}}}|needle={{{2|needle}}}}}


local p = {} --p stands for package

function p.value(frame)
	if string.find(frame.args.haystack, frame.args.needle) then
		return 1
	end
    return 0
end

return p