Edge Rewrite
// HTMLRewriter · presentation

This page was redesigned at the edge.

Cloudflare fetched the original article and streamed it through HTMLRewriter to apply an entirely new visual system without rebuilding the source page.

// request.cf · coarse context

A page that knows where it met you.

Only coarse request metadata is shown. This demo does not display or persist visitor IP addresses.

Country
US
Cloudflare location
CMH
Connection
HTTP/2
Language
Not provided

Ray ID: a2221aca9d96b7b5

Jump to content

Module:Str rightc

Permanently protected module
From Wikipedia, the free encyclopedia

require[[strict]]
local p = {}

function p._rightc(str, count, empty)
	str = mw.text.trim(str or '')
	if '' == str then
		return mw.text.trim(empty or '')
	end
	count = tonumber(count or '')
	if nil == count then
		return str
	end
	if count <= 0 then
		return ''
	end
	return mw.ustring.sub(str, -count)
end

function p.rightc(frame)
	local args = frame.args
	if '' == (args.notemplate or '') then
		args = frame:getParent().args
	end
	return p._rightc(args[1], args[2], args[3])
end

return p