15.075
Bearbeitungen
(fix c.split2()) |
(p.split2() zu p.split) |
||
| Zeile 35: | Zeile 35: | ||
function p.split2(s, delimiter) | function p.split2(s, delimiter) | ||
-- same as p.split(), but with emptiness-check | -- same as p.split(), but with emptiness-check | ||
-- if empty, then an empty table would be returned | |||
-- to do: merge with p.split() | -- to do: merge with p.split() | ||
-- mw.log("split2(" .. (s or "nil") .. ", " .. (delimiter or "nil") .. ")") | -- mw.log("split2(" .. (s or "nil") .. ", " .. (delimiter or "nil") .. ")") | ||
local result = {} | local result = {} | ||
if not c.isEmpty(s) then | if not c.isEmpty(s) then | ||
result = p.split(s, delimiter) | |||
end | end | ||
-- mw.logObject(result) | -- mw.logObject(result) | ||
return result | return result | ||