MCPcopy Create free account
hub / github.com/cogentcore/core / String

Method String

tree/nodebase.go:103–108  ·  view source on GitHub ↗

String implements the [fmt.Stringer] interface by returning the path of the node.

()

Source from the content-addressed store, hash-verified

101
102// String implements the [fmt.Stringer] interface by returning the path of the node.
103func (n *NodeBase) String() string {
104 if n == nil || n.This == nil {
105 return "nil"
106 }
107 return elide.Middle(n.Path(), 38)
108}
109
110// AsTree returns the [NodeBase] for this Node.
111func (n *NodeBase) AsTree() *NodeBase {

Callers

nothing calls this directly

Calls 2

PathMethod · 0.95
MiddleFunction · 0.92

Tested by

no test coverage detected