diff --git a/Sources/Rearrange/NSTextLocation+Comparable.swift b/Sources/Rearrange/NSTextLocation+Comparable.swift index 7753542..6839758 100644 --- a/Sources/Rearrange/NSTextLocation+Comparable.swift +++ b/Sources/Rearrange/NSTextLocation+Comparable.swift @@ -15,6 +15,18 @@ extension NSTextLocation { public static func == (lhs: Self, rhs: Self) -> Bool { return lhs.compare(rhs) == .orderedSame } + + public static func <= (lhs: Self, rhs: Self) -> Bool { + return lhs < rhs || lhs == rhs + } + + public static func > (lhs: Self, rhs: Self) -> Bool { + return lhs.compare(rhs) == .orderedDescending + } + + public static func >= (lhs: Self, rhs: Self) -> Bool { + return lhs > rhs || lhs > rhs + } } #endif