nsReadingIterator<CharT> zeroPoint; mOwningString.BeginReading(zeroPoint); mStartPos = Distance(zeroPoint, aStart); mLength = Distance(aStart, aEnd);
      nsPromiseSubstring( const basic_nsAReadableString<CharT>& aString, PRUint32 aStartPos, PRUint32 aLength )          : mString(aString),            mStartPos( NS_MIN(aStartPos, aString.Length()) ),            mLength( NS_MIN(aLength, aString.Length()-mStartPos) )        {          // nothing else to do here        }