copy_string(aReadable.BeginReading(), aReadable.EndReading(), string_ptr);
nsReadingIterator<CharT> fromBegin, fromEnd; CharT* toBegin = string_ptr; copy_string(aReadable.BeginReading(fromBegin), aReadable.EndReading(fromEnd), toBegin);
new_nsSharedString( const basic_nsAReadableString<CharT>& aReadable )  {    size_t object_size    = ((sizeof(basic_nsSharedString<CharT>) + sizeof(CharT) - 1) / sizeof(CharT)) * sizeof(CharT);    size_t string_length  = aReadable.Length();    size_t string_size    = string_length * sizeof(CharT);    void* object_ptr = operator new(object_size + string_size);    if ( object_ptr )      {        typedef CharT* CharT_ptr;        CharT* string_ptr = CharT_ptr(NS_STATIC_CAST(unsigned char*, object_ptr) + object_size);        copy_string(aReadable.BeginReading(), aReadable.EndReading(), string_ptr);        return new (object_ptr) basic_nsSharedString<CharT>(string_ptr, string_length);      }    return 0;  }