MCPcopy Index your code
hub / github.com/google/mangle / String

Method String

ast/temporal.go:365–373  ·  view source on GitHub ↗

String returns a string representation of the interval.

()

Source from the content-addressed store, hash-verified

363
364// String returns a string representation of the interval.
365func (i Interval) String() string {
366 if i.IsEternal() {
367 return "" // Eternal intervals have no annotation
368 }
369 if i.IsPoint() {
370 return fmt.Sprintf("@[%s]", i.Start.String())
371 }
372 return fmt.Sprintf("@[%s, %s]", i.Start.String(), i.End.String())
373}
374
375// Equals returns true if two intervals are equal.
376func (i Interval) Equals(other Interval) bool {

Callers 1

TestIntervalString_PointFunction · 0.95

Calls 3

IsEternalMethod · 0.95
IsPointMethod · 0.95
StringMethod · 0.65

Tested by 1

TestIntervalString_PointFunction · 0.76