MCPcopy
hub / github.com/hashicorp/hcl / ContainsOffset

Method ContainsOffset

pos.go:115–117  ·  view source on GitHub ↗

ContainsOffset returns true if and only if the given byte offset is within the receiving Range.

(offset int)

Source from the content-addressed store, hash-verified

113// ContainsOffset returns true if and only if the given byte offset is within
114// the receiving Range.
115func (r Range) ContainsOffset(offset int) bool {
116 return offset >= r.Start.Byte && offset < r.End.Byte
117}
118
119// Ptr returns a pointer to a copy of the receiver. This is a convenience when
120// ranges in places where pointers are required, such as in Diagnostic, but

Callers 5

ContainsPosMethod · 0.95
OverlapsMethod · 0.95
ContextStringMethod · 0.80
ContextDefRangeMethod · 0.80
navigationStepsRevFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected