예제 #1
0
        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;
        }
예제 #2
0
 public bool RemoveRange(Range r)
 {
     return list.Remove(r);
 }
예제 #3
0
 public Range AddRange(int index, int len)
 {
     var r = new Range { StartIndex = index, Length = len };
     list.AddLast(r);
     return r;
 }