public static void InsertText(this Rope<char> rope, int index, string text)
{
if (rope == null)
throw new ArgumentNullException("rope");
rope.InsertRange(index, text.ToCharArray(), 0, text.Length);
/*if (index < 0 || index > rope.Length) {
throw new ArgumentOutOfRangeException("index", index, "0 <= index <= " + rope.Length.ToString(CultureInfo.InvariantCulture));
}
if (text == null)
throw new ArgumentNullException("text");
if (text.Length == 0)
return;
rope.root = rope.root.Insert(index, text);
rope.OnChanged();*/
}