awful.util: rename table.concat to table.join

This is to avoid confusion with Lua's table.concat which takes a table
and returns a string of all its elements concatenated with a given
separator.

Signed-off-by: koniu <gkusnierz@gmail.com>
Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
koniu 2009-04-15 20:33:21 +01:00 committed by Julien Danjou
parent 8cbb65d5c2
commit 94b2232c4f
3 changed files with 6 additions and 6 deletions

View File

@ -31,7 +31,7 @@ local function new(_, mod, ...)
local ret = {}
local subsets = util.subsets(ignore_modifiers)
for _, set in ipairs(subsets) do
ret[#ret + 1] = capi.button(util.table.concat(mod, set), unpack(arg))
ret[#ret + 1] = capi.button(util.table.join(mod, set), unpack(arg))
end
return unpack(ret)
end

View File

@ -31,7 +31,7 @@ local function new(_, mod, ...)
local ret = {}
local subsets = util.subsets(ignore_modifiers)
for _, set in ipairs(subsets) do
ret[#ret + 1] = capi.key(util.table.concat(mod, set), unpack(arg))
ret[#ret + 1] = capi.key(util.table.join(mod, set), unpack(arg))
end
return unpack(ret)
end

View File

@ -217,12 +217,12 @@ function subsets(set)
return ret
end
--- Concat all tables given as parameters.
--- Join all tables given as parameters.
-- This will iterate all tables and insert value from 1 to N.
-- Non integer keys are ignored.
-- @param args A list of tables to concatenate
-- @return A new table with arguments concatened.
function table.concat(...)
-- @param args A list of tables to join
-- @return A new table containing all interger keys from the arguments.
function table.join(...)
local ret = {}
for i = 1, arg.n do
for k, v in ipairs(arg[i]) do table.insert(ret, v) end