Renamed FFLuCI to LuCI, ffluci to luci and Freifunk Lua Configuration Interface to...
[project/luci.git] / core / src / util.lua
index 9e3c7f2..0559fff 100644 (file)
@@ -1,5 +1,5 @@
 --[[
-FFLuCI - Utility library
+LuCI - Utility library
 
 Description:
 Several common useful Lua functions
@@ -24,7 +24,7 @@ limitations under the License.
 
 ]]--
 
-module("ffluci.util", package.seeall)
+module("luci.util", package.seeall)
 
 
 -- Lua simplified Python-style OO class support emulation
@@ -73,6 +73,18 @@ function clone(object, deep)
 end
 
 
+-- Combines two or more numerically indexed tables into one
+function combine(...)
+       local result = {}
+       for i, a in ipairs(arg) do
+               for j, v in ipairs(a) do
+                       table.insert(result, v)
+               end
+       end
+       return result
+end
+
+
 -- Checks whether a table has an object "value" in it
 function contains(table, value)
        for k,v in pairs(table) do