NS_ConvertASCIItoUTF16::NS_ConvertASCIItoUTF16( const nsACString& aCString ) { SetCapacity(aCString.Length());  nsACString::const_iterator start; aCString.BeginReading(start); nsACString::const_iterator end;   aCString.EndReading(end);  while (start != end) { const nsReadableFragment<char>& frag = start.fragment(); AppendWithConversion(frag.mStart, frag.mEnd - frag.mStart); start.advance(start.size_forward()); } }
NS_ConvertASCIItoUTF16( const char* aCString, PRUint32 aLength ) { Init( aCString, aLength ); }
NS_ConvertASCIItoUTF16::NS_ConvertASCIItoUTF16( const nsACString& aCString )  {    SetCapacity(aCString.Length());    nsACString::const_iterator start; aCString.BeginReading(start);    nsACString::const_iterator end;   aCString.EndReading(end);    while (start != end)      {        const nsReadableFragment<char>& frag = start.fragment();        AppendWithConversion(frag.mStart, frag.mEnd - frag.mStart);        start.advance(start.size_forward());      }  }