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:
@@ -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
|
||||
|
||||
@@ -472,7 +472,8 @@ public:
|
||||
|
||||
void AppendWithConversion(const nsString&, PRInt32=-1);
|
||||
void AppendWithConversion(PRUnichar aChar);
|
||||
// Why no |AppendWithConversion(const PRUnichar*)|?
|
||||
void AppendWithConversion(const PRUnichar*, PRInt32=-1);
|
||||
// Why no |AppendWithConversion(const PRUnichar*, PRInt32)|? --- now I know, because implicit construction hid the need for this routine
|
||||
void AppendInt(PRInt32 aInteger,PRInt32 aRadix=10); //radix=8,10 or 16
|
||||
void AppendFloat( double aFloat );
|
||||
|
||||
|
||||
Reference in New Issue
Block a user