mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-29 07:29:32 +00:00
collapsed DSCP stats into other (#4641)
This commit is contained in:
parent
c6797f4476
commit
888cbd77c2
3 changed files with 86 additions and 4 deletions
|
|
@ -3948,6 +3948,19 @@ end
|
|||
|
||||
-- ###########################################
|
||||
|
||||
--- Fold right table with a custom function
|
||||
--- @param t table Table to fold
|
||||
--- @param func function Function to execute on table values
|
||||
--- @param val any The returned default value
|
||||
function table.foldr(t, func, val)
|
||||
for i,v in pairs(t) do
|
||||
val = func(val, v)
|
||||
end
|
||||
return val
|
||||
end
|
||||
|
||||
-- ###########################################
|
||||
|
||||
function table.has_key(table, key)
|
||||
return table[key] ~= nil
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue