ChildCount returns the number of children a node has
()
| 94 | |
| 95 | // ChildCount returns the number of children a node has |
| 96 | func (n *Node) ChildCount() int { |
| 97 | if !n.IsValid() { |
| 98 | return 0 |
| 99 | } |
| 100 | return int(n.node.ChildCount()) |
| 101 | } |
| 102 | |
| 103 | // NamedChildCount returns the number of named children a Node has. |
| 104 | func (n *Node) NamedChildCount() int { |