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) )
nsPromiseSubstring( const nsReadingIterator<CharT>& aStart, const nsReadingIterator<CharT>& aEnd ) : mString(*aStart.mOwningString)
      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        }