Range (ext)
You’re viewing third-party extensions to Range, a struct from the Swift standard library.
You can also read the documentation forRange itself.
extension RangeYou’re viewing third-party extensions to Range, a struct from the Swift standard library.
You can also read the documentation forRange itself.
extension Range@frozen struct Range<Bound> where Bound : ComparableA half-open interval from a lower bound up to, but not including, an upper bound.
import SwiftSyntaxA library for working with Swift code.
struct AbsolutePositionAn absolute position in a source file as text - the absolute utf8Offset from the start of the file.
init(position: AbsolutePosition, length: SourceLength) var length: SourceLength { get }The number of bytes between the range’s lower bound and its upper bound
func intersected(_ other: Range<AbsolutePosition>) -> Range<AbsolutePosition> Returns the range for the overlapping region between two ranges.
func overlapsOrTouches(_ other: Range<AbsolutePosition>) -> Bool adjacent to each other.
init(offset: Int, length: Int) var endOffset: Int { get }var offset: Int { get }func intersecting(_ other: Range<AbsolutePosition>) -> Range<AbsolutePosition>? Returns the range for the overlapping region between two ranges.
func intersects(_ other: Range<AbsolutePosition>) -> Bool Returns true if the intersection between this range and other is non-empty.
func intersectsOrTouches(_ other: Range<AbsolutePosition>) -> Bool Returns true if the intersection between this range and other is non-empty or if the two ranges are directly adjacent to each other.