public string ToString (int startIndex, int length)
{
// re-ordered to avoid possible integer overflow
if (startIndex < 0 || length < 0 || startIndex > _length - length)
throw new ArgumentOutOfRangeException();
// use String.SubstringUnchecked instead of String.Substring
// as the former is guaranteed to create a new string object
if (startIndex == 0 && length == _length)
return ToString ();
else
return _str.SubstringUnchecked (startIndex, length);
}