public static string ToString(this Rope<char> rope, int startIndex, int length)
{
if (rope == null)
throw new ArgumentNullException("rope");
#if DEBUG
if (length < 0)
throw new ArgumentOutOfRangeException("length", length, "Value must be >= 0");
#endif
if (length == 0)
return string.Empty;
var buffer = new char[length];
rope.CopyTo(startIndex, buffer, 0, length);
return new string(buffer);
}