Jump to content

Module:Count: Difference between revisions

From test1-
New module: count strings
 
TheAP (talk | contribs)
m 1 revision imported
 
(No difference)

Latest revision as of 17:11, 21 February 2025

Documentation for this module may be created at Module:Count/doc

local p = {}

function p.count(frame)
	local data = frame.args[1]
	local pat = frame.args[2]
	local _, count = string.gsub(data, pat, '')
	return count
end

return p