ChildByName returns the first child that has the given name, and nil if no such element is found. startIndex arg allows for optimized bidirectional find if you have an idea where it might be, which can be a key speedup for large lists. If no value is specified for startIndex, it starts in the middle
(name string, startIndex ...int)
| 211 | // can be a key speedup for large lists. If no value is specified for |
| 212 | // startIndex, it starts in the middle, which is a good default. |
| 213 | func (n *NodeBase) ChildByName(name string, startIndex ...int) Node { |
| 214 | return n.Child(IndexByName(n.Children, name, startIndex...)) |
| 215 | } |
| 216 | |
| 217 | // Paths: |
| 218 |