Modul:Geo: Unterschied zwischen den Versionen

Variablen Schreibweise
(Stadtteil2PLZ optimiert)
(Variablen Schreibweise)
Zeile 101: Zeile 101:
if not com.isEmpty(stadtteile) then
if not com.isEmpty(stadtteile) then
local stadtteile = str.splitAndStrip(stadtteile, ";")
local stadtteile = str.splitAndStrip(stadtteile, ";")
local plz = p.stadtteil2PLZ(stadtteile)
plz = p.stadtteil2PLZ(stadtteile)
plz = str.list(plz, ";")
plz = str.list(plz, ";")
end
end
Zeile 124: Zeile 124:
-- mw.logObject(plz_table)
-- mw.logObject(plz_table)


local plz_list = {} -- Tabelle in sortierte Liste überführen
local plz = {} -- Tabelle in sortierte Liste überführen
for p, _ in pairs(plz_table) do
for p, _ in pairs(plz_table) do
table.insert(plz_list, p)
table.insert(plz, p)
end
end
table.sort(plz_list)
table.sort(plz)
-- mw.logObject(plz_list)
-- mw.logObject(plz)
return plz_list
return plz
end
end


return p
return p