Module:Trim quotes

தமிழர்விக்கியிலிருந்து
imported>Lingam பயனரால் செய்யப்பட்ட 12:42, 25 சனவரி 2024 அன்றிருந்தவாரான திருத்தம் ("local p = {} function p._trim(s) if s then if s:match([[^(['"]).*%1$]]) then return p._trim(string.sub(s,2,-2)) else return s end else return "" end end function p.trim(frame) local s = (frame.args['s'] or frame.args[1]) or (frame:getParent().args['s'] or frame:getParent().args[1]) return p._trim(s) end return p"-இப்பெயரில் புதிய பக்கம் உருவாக்கப்பட்டுள்ளது)
(வேறுபாடு) ← பழைய திருத்தம் | ஆக அண்மைய திருத்தம் (வேறுபாடு) | புதிய திருத்தம் → (வேறுபாடு)
Jump to navigation Jump to search

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

local p = {}

function p._trim(s)
	if s then
		if s:match([[^(['"]).*%1$]]) then return p._trim(string.sub(s,2,-2)) else return s end
	else
		return ""
	end
end

function p.trim(frame)
	local s = (frame.args['s'] or frame.args[1]) or (frame:getParent().args['s'] or frame:getParent().args[1])
	return p._trim(s)
end

return p
"https://tamilar.wiki/w/index.php?title=Module:Trim_quotes&oldid=89496" இலிருந்து மீள்விக்கப்பட்டது