Module:Template:R:IcelandicOnlineDictionary

Hello, you have come here looking for the meaning of the word Module:Template:R:IcelandicOnlineDictionary. In DICTIOUS you will not only get to know all the dictionary meanings for the word Module:Template:R:IcelandicOnlineDictionary, but we will also tell you about its etymology, its characteristics and you will know how to say Module:Template:R:IcelandicOnlineDictionary in singular and plural. Everything you need to know about the word Module:Template:R:IcelandicOnlineDictionary you have here. The definition of the word Module:Template:R:IcelandicOnlineDictionary will help you to be more precise and correct when speaking or writing your texts. Knowing the definition ofModule:Template:R:IcelandicOnlineDictionary, as well as those of other words, enriches your vocabulary and provides you with more and better linguistic resources.

This module needs documentation.
Please document this module by describing its purpose and usage on the documentation page.

local m_str_utils = require("Module:string utilities")

local codepoint = m_str_utils.codepoint
local ugsub = m_str_utils.gsub
local uri_encode = mw.uri.encode

local export = {}

function export.uri_encode(arg1)
	return uri_encode(
		ugsub(arg1, '', function (c)
			local i = codepoint(c)
			if i < 256 then
				return string.char(i)
			else
				return "?"
			end
		end),
		'QUERY'
	)
end

function export.main(frame)
	local args = frame:getParent().args
	local arg1 = args or mw.title.getCurrentTitle().text    -- {{{1|{{PAGENAME}}}}}
	local q1 = export.uri_encode(arg1)
	return (
		'"[http://digicoll.library.wisc.edu/cgi-bin/IcelOnline/IcelOnline.TEId-idx' ..
		'?type=simple&size=First+100&rgn=lemma&q1=' .. q1 .. '&submit=Search' ..
		' ' .. arg1 .. ']" in <i>Icelandic Online Dictionary and Readings</i>.'
	)
end

return export