public Range SplitRange(Range r, int index) { var range = new Range { StartIndex = index, Length = r.EndIndex - index }; r.Length = index - r.StartIndex; var node = list.Find(r); list.AddAfter(node, range); return range; }
public bool RemoveRange(Range r) { return list.Remove(r); }
public Range AddRange(int index, int len) { var r = new Range { StartIndex = index, Length = len }; list.AddLast(r); return r; }