Module:SPageString.lua: Difference between revisions
From Guild of Archivists
No edit summary |
m (1 revision imported) |
(No difference)
|
Latest revision as of 07:26, 30 October 2015
Documentation for this module may be created at Module:SPageString.lua/doc
local p = {}
p.bigStr = [[
|01001=22.4
|01002=17.3
|01004=21.1
|01005=20.0
|01006=9.3
]]
function p.lookUp(frame)
p.lookFor = frame.args[1]
p.result = 'Hello, my ' .. frame.args[1] .. ' is ' .. frame.args[2] .. ' and my bigStr len is ' .. string.len( p.bigStr )
p.findStr = '|' .. p.lookFor .. '='
p.begin, p.ending = string.find( p.bigStr, p.findStr )
p.result = p.result .. 'findStr=' .. p.findStr .. 'begin and end=' .. p.begin .. ',' .. p.ending
return p.result
end
return p