Module:Substring?

local export = {}

function export.check( frame )
	local x = frame.args[1]
	if (x == nil) then return "" end
	local y = frame.args[2]
	if (y == nil) then return "" end
	local z = mw.ustring.find( x, y, 1, true )
	if (z ~= nil) then return z end
	return ""
end

return export