mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-01-26 23:23:33 +00:00
no, the |Equals(PRUnichar*, PRUnichar*, ...)| form is not what you think it is. It has to go. Make comparing with |nsIAtoms| remain avalailable even in |NEW_STRINGS_APIS|
This commit is contained in:
parent
66ed9724ae
commit
0c5356d1cc
@ -1970,21 +1970,6 @@ PRBool nsString::EqualsWithConversion(const PRUnichar* aString,PRBool aIgnoreCas
|
||||
return result;
|
||||
}
|
||||
|
||||
#ifndef NEW_STRING_APIS
|
||||
/**
|
||||
* Compare this to given string; note that we compare full strings here.
|
||||
*
|
||||
* @update gess 01/04/99
|
||||
* @param aString is the other nsString to be compared to
|
||||
* @param aCount tells us how many chars to test; -1 implies full length
|
||||
* @return TRUE if equal
|
||||
*/
|
||||
PRBool nsString::Equals(const nsStr& aString,PRBool aIgnoreCase,PRInt32 aCount) const {
|
||||
PRInt32 theAnswer=nsStr::StrCompare(*this,aString,aCount,aIgnoreCase);
|
||||
PRBool result=PRBool(0==theAnswer);
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Compare this to given atom; note that we compare full strings here.
|
||||
* The optional length argument just lets us know how long the given string is.
|
||||
@ -1996,7 +1981,7 @@ PRBool nsString::Equals(const nsStr& aString,PRBool aIgnoreCase,PRInt32 aCount)
|
||||
* @param aLength -- length of given string.
|
||||
* @return TRUE if equal
|
||||
*/
|
||||
PRBool nsString::Equals(/*FIX: const */nsIAtom* aAtom,PRBool aIgnoreCase) const{
|
||||
PRBool nsString::EqualsAtom(/*FIX: const */nsIAtom* aAtom,PRBool aIgnoreCase) const{
|
||||
NS_ASSERTION(0!=aAtom,kNullPointerError);
|
||||
PRBool result=PR_FALSE;
|
||||
if(aAtom){
|
||||
@ -2014,6 +1999,21 @@ PRBool nsString::Equals(/*FIX: const */nsIAtom* aAtom,PRBool aIgnoreCase) const{
|
||||
return result;
|
||||
}
|
||||
|
||||
#ifndef NEW_STRING_APIS
|
||||
/**
|
||||
* Compare this to given string; note that we compare full strings here.
|
||||
*
|
||||
* @update gess 01/04/99
|
||||
* @param aString is the other nsString to be compared to
|
||||
* @param aCount tells us how many chars to test; -1 implies full length
|
||||
* @return TRUE if equal
|
||||
*/
|
||||
PRBool nsString::Equals(const nsStr& aString,PRBool aIgnoreCase,PRInt32 aCount) const {
|
||||
PRInt32 theAnswer=nsStr::StrCompare(*this,aString,aCount,aIgnoreCase);
|
||||
PRBool result=PRBool(0==theAnswer);
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Compare given strings
|
||||
* @update gess 7/27/98
|
||||
|
@ -721,11 +721,11 @@ public:
|
||||
PRBool EqualsWithConversion(const nsString &aString,PRBool aIgnoreCase=PR_FALSE,PRInt32 aCount=-1) const;
|
||||
PRBool EqualsWithConversion(const char* aString,PRBool aIgnoreCase=PR_FALSE,PRInt32 aCount=-1) const;
|
||||
PRBool EqualsWithConversion(const PRUnichar* aString,PRBool aIgnoreCase=PR_FALSE,PRInt32 aCount=-1) const;
|
||||
PRBool EqualsAtom(/*FIX: const */nsIAtom* anAtom,PRBool aIgnoreCase) const;
|
||||
|
||||
PRBool EqualsIgnoreCase(const nsString& aString) const;
|
||||
PRBool EqualsIgnoreCase(const char* aString,PRInt32 aCount=-1) const;
|
||||
PRBool EqualsIgnoreCase(/*FIX: const */nsIAtom *aAtom) const;
|
||||
PRBool EqualsIgnoreCase(const PRUnichar* s1, const PRUnichar* s2) const;
|
||||
|
||||
#ifndef NEW_STRING_APIS
|
||||
virtual PRInt32 Compare(const char* aString,PRBool aIgnoreCase=PR_FALSE,PRInt32 aCount=-1) const {
|
||||
@ -765,10 +765,11 @@ public:
|
||||
return EqualsWithConversion(aString,aIgnoreCase,aCount);
|
||||
}
|
||||
|
||||
PRBool Equals(/*FIX: const */nsIAtom* anAtom,PRBool aIgnoreCase) const;
|
||||
PRBool Equals(/*FIX: const */nsIAtom* anAtom,PRBool aIgnoreCase) const { return EqualsAtom(anAtom, aIgnoreCase); }
|
||||
PRBool Equals(const PRUnichar* s1, const PRUnichar* s2,PRBool aIgnoreCase=PR_FALSE) const;
|
||||
PRBool Equals(const nsStr& aString,PRBool aIgnoreCase=PR_FALSE,PRInt32 aCount=-1) const;
|
||||
|
||||
PRBool EqualsIgnoreCase(const PRUnichar* s1, const PRUnichar* s2) const;
|
||||
|
||||
/**
|
||||
* These methods compare a given string type to this one
|
||||
|
@ -1970,21 +1970,6 @@ PRBool nsString::EqualsWithConversion(const PRUnichar* aString,PRBool aIgnoreCas
|
||||
return result;
|
||||
}
|
||||
|
||||
#ifndef NEW_STRING_APIS
|
||||
/**
|
||||
* Compare this to given string; note that we compare full strings here.
|
||||
*
|
||||
* @update gess 01/04/99
|
||||
* @param aString is the other nsString to be compared to
|
||||
* @param aCount tells us how many chars to test; -1 implies full length
|
||||
* @return TRUE if equal
|
||||
*/
|
||||
PRBool nsString::Equals(const nsStr& aString,PRBool aIgnoreCase,PRInt32 aCount) const {
|
||||
PRInt32 theAnswer=nsStr::StrCompare(*this,aString,aCount,aIgnoreCase);
|
||||
PRBool result=PRBool(0==theAnswer);
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Compare this to given atom; note that we compare full strings here.
|
||||
* The optional length argument just lets us know how long the given string is.
|
||||
@ -1996,7 +1981,7 @@ PRBool nsString::Equals(const nsStr& aString,PRBool aIgnoreCase,PRInt32 aCount)
|
||||
* @param aLength -- length of given string.
|
||||
* @return TRUE if equal
|
||||
*/
|
||||
PRBool nsString::Equals(/*FIX: const */nsIAtom* aAtom,PRBool aIgnoreCase) const{
|
||||
PRBool nsString::EqualsAtom(/*FIX: const */nsIAtom* aAtom,PRBool aIgnoreCase) const{
|
||||
NS_ASSERTION(0!=aAtom,kNullPointerError);
|
||||
PRBool result=PR_FALSE;
|
||||
if(aAtom){
|
||||
@ -2014,6 +1999,21 @@ PRBool nsString::Equals(/*FIX: const */nsIAtom* aAtom,PRBool aIgnoreCase) const{
|
||||
return result;
|
||||
}
|
||||
|
||||
#ifndef NEW_STRING_APIS
|
||||
/**
|
||||
* Compare this to given string; note that we compare full strings here.
|
||||
*
|
||||
* @update gess 01/04/99
|
||||
* @param aString is the other nsString to be compared to
|
||||
* @param aCount tells us how many chars to test; -1 implies full length
|
||||
* @return TRUE if equal
|
||||
*/
|
||||
PRBool nsString::Equals(const nsStr& aString,PRBool aIgnoreCase,PRInt32 aCount) const {
|
||||
PRInt32 theAnswer=nsStr::StrCompare(*this,aString,aCount,aIgnoreCase);
|
||||
PRBool result=PRBool(0==theAnswer);
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Compare given strings
|
||||
* @update gess 7/27/98
|
||||
|
@ -721,11 +721,11 @@ public:
|
||||
PRBool EqualsWithConversion(const nsString &aString,PRBool aIgnoreCase=PR_FALSE,PRInt32 aCount=-1) const;
|
||||
PRBool EqualsWithConversion(const char* aString,PRBool aIgnoreCase=PR_FALSE,PRInt32 aCount=-1) const;
|
||||
PRBool EqualsWithConversion(const PRUnichar* aString,PRBool aIgnoreCase=PR_FALSE,PRInt32 aCount=-1) const;
|
||||
PRBool EqualsAtom(/*FIX: const */nsIAtom* anAtom,PRBool aIgnoreCase) const;
|
||||
|
||||
PRBool EqualsIgnoreCase(const nsString& aString) const;
|
||||
PRBool EqualsIgnoreCase(const char* aString,PRInt32 aCount=-1) const;
|
||||
PRBool EqualsIgnoreCase(/*FIX: const */nsIAtom *aAtom) const;
|
||||
PRBool EqualsIgnoreCase(const PRUnichar* s1, const PRUnichar* s2) const;
|
||||
|
||||
#ifndef NEW_STRING_APIS
|
||||
virtual PRInt32 Compare(const char* aString,PRBool aIgnoreCase=PR_FALSE,PRInt32 aCount=-1) const {
|
||||
@ -765,10 +765,11 @@ public:
|
||||
return EqualsWithConversion(aString,aIgnoreCase,aCount);
|
||||
}
|
||||
|
||||
PRBool Equals(/*FIX: const */nsIAtom* anAtom,PRBool aIgnoreCase) const;
|
||||
PRBool Equals(/*FIX: const */nsIAtom* anAtom,PRBool aIgnoreCase) const { return EqualsAtom(anAtom, aIgnoreCase); }
|
||||
PRBool Equals(const PRUnichar* s1, const PRUnichar* s2,PRBool aIgnoreCase=PR_FALSE) const;
|
||||
PRBool Equals(const nsStr& aString,PRBool aIgnoreCase=PR_FALSE,PRInt32 aCount=-1) const;
|
||||
|
||||
PRBool EqualsIgnoreCase(const PRUnichar* s1, const PRUnichar* s2) const;
|
||||
|
||||
/**
|
||||
* These methods compare a given string type to this one
|
||||
|
@ -1970,21 +1970,6 @@ PRBool nsString::EqualsWithConversion(const PRUnichar* aString,PRBool aIgnoreCas
|
||||
return result;
|
||||
}
|
||||
|
||||
#ifndef NEW_STRING_APIS
|
||||
/**
|
||||
* Compare this to given string; note that we compare full strings here.
|
||||
*
|
||||
* @update gess 01/04/99
|
||||
* @param aString is the other nsString to be compared to
|
||||
* @param aCount tells us how many chars to test; -1 implies full length
|
||||
* @return TRUE if equal
|
||||
*/
|
||||
PRBool nsString::Equals(const nsStr& aString,PRBool aIgnoreCase,PRInt32 aCount) const {
|
||||
PRInt32 theAnswer=nsStr::StrCompare(*this,aString,aCount,aIgnoreCase);
|
||||
PRBool result=PRBool(0==theAnswer);
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Compare this to given atom; note that we compare full strings here.
|
||||
* The optional length argument just lets us know how long the given string is.
|
||||
@ -1996,7 +1981,7 @@ PRBool nsString::Equals(const nsStr& aString,PRBool aIgnoreCase,PRInt32 aCount)
|
||||
* @param aLength -- length of given string.
|
||||
* @return TRUE if equal
|
||||
*/
|
||||
PRBool nsString::Equals(/*FIX: const */nsIAtom* aAtom,PRBool aIgnoreCase) const{
|
||||
PRBool nsString::EqualsAtom(/*FIX: const */nsIAtom* aAtom,PRBool aIgnoreCase) const{
|
||||
NS_ASSERTION(0!=aAtom,kNullPointerError);
|
||||
PRBool result=PR_FALSE;
|
||||
if(aAtom){
|
||||
@ -2014,6 +1999,21 @@ PRBool nsString::Equals(/*FIX: const */nsIAtom* aAtom,PRBool aIgnoreCase) const{
|
||||
return result;
|
||||
}
|
||||
|
||||
#ifndef NEW_STRING_APIS
|
||||
/**
|
||||
* Compare this to given string; note that we compare full strings here.
|
||||
*
|
||||
* @update gess 01/04/99
|
||||
* @param aString is the other nsString to be compared to
|
||||
* @param aCount tells us how many chars to test; -1 implies full length
|
||||
* @return TRUE if equal
|
||||
*/
|
||||
PRBool nsString::Equals(const nsStr& aString,PRBool aIgnoreCase,PRInt32 aCount) const {
|
||||
PRInt32 theAnswer=nsStr::StrCompare(*this,aString,aCount,aIgnoreCase);
|
||||
PRBool result=PRBool(0==theAnswer);
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Compare given strings
|
||||
* @update gess 7/27/98
|
||||
|
@ -721,11 +721,11 @@ public:
|
||||
PRBool EqualsWithConversion(const nsString &aString,PRBool aIgnoreCase=PR_FALSE,PRInt32 aCount=-1) const;
|
||||
PRBool EqualsWithConversion(const char* aString,PRBool aIgnoreCase=PR_FALSE,PRInt32 aCount=-1) const;
|
||||
PRBool EqualsWithConversion(const PRUnichar* aString,PRBool aIgnoreCase=PR_FALSE,PRInt32 aCount=-1) const;
|
||||
PRBool EqualsAtom(/*FIX: const */nsIAtom* anAtom,PRBool aIgnoreCase) const;
|
||||
|
||||
PRBool EqualsIgnoreCase(const nsString& aString) const;
|
||||
PRBool EqualsIgnoreCase(const char* aString,PRInt32 aCount=-1) const;
|
||||
PRBool EqualsIgnoreCase(/*FIX: const */nsIAtom *aAtom) const;
|
||||
PRBool EqualsIgnoreCase(const PRUnichar* s1, const PRUnichar* s2) const;
|
||||
|
||||
#ifndef NEW_STRING_APIS
|
||||
virtual PRInt32 Compare(const char* aString,PRBool aIgnoreCase=PR_FALSE,PRInt32 aCount=-1) const {
|
||||
@ -765,10 +765,11 @@ public:
|
||||
return EqualsWithConversion(aString,aIgnoreCase,aCount);
|
||||
}
|
||||
|
||||
PRBool Equals(/*FIX: const */nsIAtom* anAtom,PRBool aIgnoreCase) const;
|
||||
PRBool Equals(/*FIX: const */nsIAtom* anAtom,PRBool aIgnoreCase) const { return EqualsAtom(anAtom, aIgnoreCase); }
|
||||
PRBool Equals(const PRUnichar* s1, const PRUnichar* s2,PRBool aIgnoreCase=PR_FALSE) const;
|
||||
PRBool Equals(const nsStr& aString,PRBool aIgnoreCase=PR_FALSE,PRInt32 aCount=-1) const;
|
||||
|
||||
PRBool EqualsIgnoreCase(const PRUnichar* s1, const PRUnichar* s2) const;
|
||||
|
||||
/**
|
||||
* These methods compare a given string type to this one
|
||||
|
Loading…
x
Reference in New Issue
Block a user