Modul:DecodeArgs
Aus GEOWiki@LMU
Version vom 25. April 2020, 18:17 Uhr von Christopher Frank (Diskussion | Beiträge)
Die Dokumentation für dieses Modul kann unter Modul:DecodeArgs/Doku erstellt werden
local p = {} function p.decode( frame ) local r = '' local start = 1 local stop = 1 local j = tonumber(frame.args[1]) local s = frame.args[2] or '' if j == 1 then stop = string.find( s, ', ', start ) end if j ~= 1 then for i = 1,j do start = stop + 2 stop = string.find( s, ', ', start ) end end r = string.sub( s , start, (stop - 1) ) .. frame.args[1] .. start .. stop return r end return p