diff --git a/base/src/nsCRT.h b/base/src/nsCRT.h index c1d701b5c60..9f651aedf29 100644 --- a/base/src/nsCRT.h +++ b/base/src/nsCRT.h @@ -86,6 +86,10 @@ public: return PRInt32(PL_strncasecmp(s1, s2, aMaxLen)); } + static PRInt32 strncmp(const char* s1, const char* s2, PRInt32 aMaxLen) { + return PRInt32(PL_strncmp(s1,s2,aMaxLen)); + } + static char* strdup(const char* str) { return PL_strdup(str); } diff --git a/base/src/nsString.cpp b/base/src/nsString.cpp index 086adb7730d..9eeccac554e 100644 --- a/base/src/nsString.cpp +++ b/base/src/nsString.cpp @@ -1775,6 +1775,7 @@ PRInt32 nsString::Compare(const PRUnichar* aString,PRBool aIgnoreCase,PRInt32 aL PRBool nsString::operator==(const nsString &S) const {return Equals(S);} PRBool nsString::operator==(const char *s) const {return Equals(s);} PRBool nsString::operator==(const PRUnichar *s) const {return Equals(s);} +PRBool nsString::operator==(PRUnichar *s) const {return Equals(s);} PRBool nsString::operator!=(const nsString &S) const {return PRBool(Compare(S)!=0);} PRBool nsString::operator!=(const char *s) const {return PRBool(Compare(s)!=0);} PRBool nsString::operator!=(const PRUnichar *s) const {return PRBool(Compare(s)!=0);} diff --git a/base/src/nsString.h b/base/src/nsString.h index 8e4ff784075..a641dbca3b1 100644 --- a/base/src/nsString.h +++ b/base/src/nsString.h @@ -648,6 +648,7 @@ virtual PRInt32 Compare(const PRUnichar *aString,PRBool aIgnoreCase=PR_FALSE,PRI PRBool operator==(const nsString &aString) const; PRBool operator==(const char *aString) const; PRBool operator==(const PRUnichar* aString) const; +PRBool operator==(PRUnichar* aString) const; /** * These methods perform a !compare of a given string type to this diff --git a/string/obsolete/nsString.cpp b/string/obsolete/nsString.cpp index 086adb7730d..9eeccac554e 100644 --- a/string/obsolete/nsString.cpp +++ b/string/obsolete/nsString.cpp @@ -1775,6 +1775,7 @@ PRInt32 nsString::Compare(const PRUnichar* aString,PRBool aIgnoreCase,PRInt32 aL PRBool nsString::operator==(const nsString &S) const {return Equals(S);} PRBool nsString::operator==(const char *s) const {return Equals(s);} PRBool nsString::operator==(const PRUnichar *s) const {return Equals(s);} +PRBool nsString::operator==(PRUnichar *s) const {return Equals(s);} PRBool nsString::operator!=(const nsString &S) const {return PRBool(Compare(S)!=0);} PRBool nsString::operator!=(const char *s) const {return PRBool(Compare(s)!=0);} PRBool nsString::operator!=(const PRUnichar *s) const {return PRBool(Compare(s)!=0);} diff --git a/string/obsolete/nsString.h b/string/obsolete/nsString.h index 8e4ff784075..a641dbca3b1 100644 --- a/string/obsolete/nsString.h +++ b/string/obsolete/nsString.h @@ -648,6 +648,7 @@ virtual PRInt32 Compare(const PRUnichar *aString,PRBool aIgnoreCase=PR_FALSE,PRI PRBool operator==(const nsString &aString) const; PRBool operator==(const char *aString) const; PRBool operator==(const PRUnichar* aString) const; +PRBool operator==(PRUnichar* aString) const; /** * These methods perform a !compare of a given string type to this diff --git a/xpcom/ds/nsCRT.h b/xpcom/ds/nsCRT.h index c1d701b5c60..9f651aedf29 100644 --- a/xpcom/ds/nsCRT.h +++ b/xpcom/ds/nsCRT.h @@ -86,6 +86,10 @@ public: return PRInt32(PL_strncasecmp(s1, s2, aMaxLen)); } + static PRInt32 strncmp(const char* s1, const char* s2, PRInt32 aMaxLen) { + return PRInt32(PL_strncmp(s1,s2,aMaxLen)); + } + static char* strdup(const char* str) { return PL_strdup(str); } diff --git a/xpcom/ds/nsString.cpp b/xpcom/ds/nsString.cpp index 086adb7730d..9eeccac554e 100644 --- a/xpcom/ds/nsString.cpp +++ b/xpcom/ds/nsString.cpp @@ -1775,6 +1775,7 @@ PRInt32 nsString::Compare(const PRUnichar* aString,PRBool aIgnoreCase,PRInt32 aL PRBool nsString::operator==(const nsString &S) const {return Equals(S);} PRBool nsString::operator==(const char *s) const {return Equals(s);} PRBool nsString::operator==(const PRUnichar *s) const {return Equals(s);} +PRBool nsString::operator==(PRUnichar *s) const {return Equals(s);} PRBool nsString::operator!=(const nsString &S) const {return PRBool(Compare(S)!=0);} PRBool nsString::operator!=(const char *s) const {return PRBool(Compare(s)!=0);} PRBool nsString::operator!=(const PRUnichar *s) const {return PRBool(Compare(s)!=0);} diff --git a/xpcom/ds/nsString.h b/xpcom/ds/nsString.h index 8e4ff784075..a641dbca3b1 100644 --- a/xpcom/ds/nsString.h +++ b/xpcom/ds/nsString.h @@ -648,6 +648,7 @@ virtual PRInt32 Compare(const PRUnichar *aString,PRBool aIgnoreCase=PR_FALSE,PRI PRBool operator==(const nsString &aString) const; PRBool operator==(const char *aString) const; PRBool operator==(const PRUnichar* aString) const; +PRBool operator==(PRUnichar* aString) const; /** * These methods perform a !compare of a given string type to this diff --git a/xpcom/string/obsolete/nsString.cpp b/xpcom/string/obsolete/nsString.cpp index 086adb7730d..9eeccac554e 100644 --- a/xpcom/string/obsolete/nsString.cpp +++ b/xpcom/string/obsolete/nsString.cpp @@ -1775,6 +1775,7 @@ PRInt32 nsString::Compare(const PRUnichar* aString,PRBool aIgnoreCase,PRInt32 aL PRBool nsString::operator==(const nsString &S) const {return Equals(S);} PRBool nsString::operator==(const char *s) const {return Equals(s);} PRBool nsString::operator==(const PRUnichar *s) const {return Equals(s);} +PRBool nsString::operator==(PRUnichar *s) const {return Equals(s);} PRBool nsString::operator!=(const nsString &S) const {return PRBool(Compare(S)!=0);} PRBool nsString::operator!=(const char *s) const {return PRBool(Compare(s)!=0);} PRBool nsString::operator!=(const PRUnichar *s) const {return PRBool(Compare(s)!=0);} diff --git a/xpcom/string/obsolete/nsString.h b/xpcom/string/obsolete/nsString.h index 8e4ff784075..a641dbca3b1 100644 --- a/xpcom/string/obsolete/nsString.h +++ b/xpcom/string/obsolete/nsString.h @@ -648,6 +648,7 @@ virtual PRInt32 Compare(const PRUnichar *aString,PRBool aIgnoreCase=PR_FALSE,PRI PRBool operator==(const nsString &aString) const; PRBool operator==(const char *aString) const; PRBool operator==(const PRUnichar* aString) const; +PRBool operator==(PRUnichar* aString) const; /** * These methods perform a !compare of a given string type to this