adding |AppendWithConverison(const PRUnichar*, PRInt32)|, the need for which was brought out by making constructors |explicit|

git-svn-id: svn://10.0.0.236/trunk@76711 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
scc%mozilla.org
2000-08-19 19:34:00 +00:00
parent ff106ebc52
commit b286b36f72
6 changed files with 45 additions and 3 deletions

View File

@@ -1072,6 +1072,19 @@ void nsCString::AppendWithConversion(PRUnichar aChar) {
StrAppend(*this,temp,0,1);
}
void nsCString::AppendWithConversion( const PRUnichar* aBuffer, PRInt32 aLength )
{
nsStr temp;
nsStr::Initialize(temp, eTwoByte);
temp.mUStr = NS_CONST_CAST(PRUnichar*, aBuffer);
if ( aLength < 0 )
aLength = nsCharTraits<PRUnichar>::length(aBuffer);
if ( aLength > 0 )
StrAppend(*this, temp, 0, aLength);
}
/**
* Append the given integer to this string
* @update gess 01/04/99