From 1eaa6d5152005e76e5fbd1e622eababd2b024e20 Mon Sep 17 00:00:00 2001 From: "rickg%netscape.com" Date: Fri, 19 Nov 1999 08:05:30 +0000 Subject: [PATCH] added DebugDump() to nsString classes for terminal output. Also slightly improved documentation. r=buster git-svn-id: svn://10.0.0.236/trunk@53985 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/string/obsolete/nsString.cpp | 31 +++++++----- mozilla/string/obsolete/nsString.h | 11 ++++- mozilla/string/obsolete/nsString2.cpp | 54 +++++++++++++++------ mozilla/string/obsolete/nsString2.h | 10 ++-- mozilla/xpcom/ds/nsString.cpp | 31 +++++++----- mozilla/xpcom/ds/nsString.h | 11 ++++- mozilla/xpcom/ds/nsString2.cpp | 54 +++++++++++++++------ mozilla/xpcom/ds/nsString2.h | 10 ++-- mozilla/xpcom/string/obsolete/nsString.cpp | 31 +++++++----- mozilla/xpcom/string/obsolete/nsString.h | 11 ++++- mozilla/xpcom/string/obsolete/nsString2.cpp | 54 +++++++++++++++------ mozilla/xpcom/string/obsolete/nsString2.h | 10 ++-- 12 files changed, 222 insertions(+), 96 deletions(-) diff --git a/mozilla/string/obsolete/nsString.cpp b/mozilla/string/obsolete/nsString.cpp index 775bf310754..14a4cf96ab9 100644 --- a/mozilla/string/obsolete/nsString.cpp +++ b/mozilla/string/obsolete/nsString.cpp @@ -765,6 +765,9 @@ nsCString& nsCString::Assign(const nsStr& aString,PRInt32 aCount) { * assign given char* to this string * @update gess 01/04/99 * @param aCString: buffer to be assigned to this + * @param aCount -- length of given buffer or -1 if you want me to compute length. + * NOTE: IFF you pass -1 as aCount, then your buffer must be null terminated. + * * @return this */ nsCString& nsCString::Assign(const char* aCString,PRInt32 aCount) { @@ -779,6 +782,9 @@ nsCString& nsCString::Assign(const char* aCString,PRInt32 aCount) { * assign given unichar* to this string * @update gess 01/04/99 * @param aCString: buffer to be assigned to this + * @param aCount -- length of given buffer or -1 if you want me to compute length. + * NOTE: IFF you pass -1 as aCount, then your buffer must be null terminated. + * * @return this */ nsCString& nsCString::Assign(const PRUnichar* aString,PRInt32 aCount) { @@ -888,6 +894,8 @@ nsCString& nsCString::Append(const nsStr& aString,PRInt32 aCount) { * @update gess 01/04/99 * @param aString : string to be appended to this * @param aCount: #of chars to be copied; -1 means to copy the whole thing + * NOTE: IFF you pass -1 as aCount, then your buffer must be null terminated. + * * @return this */ nsCString& nsCString::Append(const char* aCString,PRInt32 aCount) { @@ -1660,18 +1668,6 @@ void nsCString::Recycle(nsCString* aString){ } #if 0 -/** - * - * @update gess 01/04/99 - * @param - * @return - */ -void nsCString::DebugDump(ostream& aStream) const { - for(PRUint32 i=0;i