public static bool ContainsInclusiveEnd(ITextRange range, ITextRange other) { return range.Contains(other.Start) && (range.Contains(other.End) || range.End == other.End); }