Modul:DecodeArgs: Unterschied zwischen den Versionen
Aus GEOWiki@LMU
Zeile 15: | Zeile 15: | ||
do | do | ||
start = stop + 2 | start = stop + 2 | ||
− | stop = string.find( s, ', ', start | + | stop = string.find( s, ', ', start ) |
end | end | ||
end | end |
Version vom 25. April 2020, 18:16 Uhr
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 = 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