countchildrenΒΆ
Returns the number of children.
The countchildren function is written as:
function countchildren (...)
local count = 0
for node in children (...) do
count = count+1
end
return count
end
Arguments:
node The parent node to count childrentype A class the children to countpattern A Lua's pattern used to check the name of the node, or a function that filter the node. See Lua's pattern documentation.recursive if true, traverse the children recursively.