aDest.mStr=aSource.mStr; aDest.mLength=aSource.mLength; aDest.mCharSize=aSource.mCharSize; aDest.mCapacity=aSource.mCapacity; aDest.mOwnsBuffer=aSource.mOwnsBuffer; aSource.mOwnsBuffer=PR_FALSE; aSource.mStr=0;
if(aSource.mStr && aSource.mLength) { if(aSource.mOwnsBuffer){ aDest.mStr=aSource.mStr; aDest.mLength=aSource.mLength; aDest.mCharSize=aSource.mCharSize; aDest.mCapacity=aSource.mCapacity; aDest.mOwnsBuffer=aSource.mOwnsBuffer; aSource.mOwnsBuffer=false; aSource.mStr=0; } else{ nsStr::Assign(aDest,aSource,0,aSource.mLength,0); } } else nsStr::Truncate(aDest,0,0);
void Subsume(nsStr& aDest,nsStr& aSource){  aDest.mStr=aSource.mStr;  aDest.mLength=aSource.mLength;  aDest.mCharSize=aSource.mCharSize;  aDest.mCapacity=aSource.mCapacity;  aDest.mOwnsBuffer=aSource.mOwnsBuffer;  aSource.mOwnsBuffer=PR_FALSE;  aSource.mStr=0;}