#include <nsStringAPI.h>
Public Types | |
| typedef PRUnichar | char_type |
| typedef nsAString | self_type |
| typedef PRUint32 | size_type |
| typedef PRUint32 | index_type |
| typedef PRInt32(* | ComparatorFunc )(const char_type *a, const char_type *b, PRUint32 length) |
| Compare strings of characters. | |
Public Member Functions | |
| NS_HIDDEN_ (PRUint32) BeginReading(const char_type **begin | |
| Returns the length, beginning, and end of a string in one operation. | |
| NS_HIDDEN_ (const char_type *) BeginReading() const | |
| NS_HIDDEN_ (const char_type *) EndReading() const | |
| NS_HIDDEN_ (char_type) CharAt(PRUint32 aPos) const | |
| NS_HIDDEN_ (char_type) operator[](PRUint32 aPos) const | |
| NS_HIDDEN_ (char_type) First() const | |
| NS_HIDDEN_ (PRUint32) BeginWriting(char_type **begin | |
| Get the length, begin writing, and optionally set the length of a string all in one operation. | |
| NS_HIDDEN_ (char_type *) BeginWriting(PRUint32 | |
| NS_HIDDEN_ (char_type *) EndWriting() | |
| NS_HIDDEN_ (PRBool) SetLength(PRUint32 aLen) | |
| NS_HIDDEN_ (size_type) Length() const | |
| NS_HIDDEN_ (PRBool) IsEmpty() const | |
| NS_HIDDEN_ (void) SetIsVoid(PRBool val) | |
| NS_HIDDEN_ (PRBool) IsVoid() const | |
| NS_HIDDEN_ (void) Assign(const self_type &aString) | |
| NS_HIDDEN_ (void) Assign(const char_type *aData | |
| NS_HIDDEN_ (self_type &) operator | |
| NS_HIDDEN_ (self_type &) operator+ | |
| NS_HIDDEN_ (void) StripWhitespace() | |
| Strip whitespace characters from the string. | |
| NS_HIDDEN_ (void) Trim(const char *aSet | |
| NS_HIDDEN_ (PRInt32) Compare(const char_type *other | |
| NS_HIDDEN_ (PRInt32) Compare(const self_type &other | |
| NS_HIDDEN_ (PRBool) Equals(const char_type *other | |
| NS_HIDDEN_ (PRBool) Equals(const self_type &other | |
| NS_HIDDEN_ (PRBool) operator<(const self_type &other) const | |
| NS_HIDDEN_ (PRBool) operator<(const char_type *other) const | |
| NS_HIDDEN_ (PRBool) operator< | |
| NS_HIDDEN_ (PRBool) LowerCaseEqualsLiteral(const char *aASCIIString) const | |
| Case-insensitive match this string to a lowercase ASCII string. | |
| NS_HIDDEN_ (PRInt32) Find(const self_type &aStr | |
| Find the first occurrence of aStr in this string. | |
| NS_HIDDEN_ (PRInt32) Find(const char *aStr | |
| Find an ASCII string within this string. | |
| NS_HIDDEN_ (PRInt32) RFind(const self_type &aStr | |
| Find the last occurrence of aStr in this string. | |
| NS_HIDDEN_ (PRInt32) RFind(const char *aStr | |
| Find the last occurrence of an ASCII string within this string. | |
| NS_HIDDEN_ (PRInt32) FindChar(char_type aChar | |
| Search for the offset of the first occurrence of a character in a string. | |
| NS_HIDDEN_ (PRInt32) RFindChar(char_type aChar) const | |
| Search for the offset of the last occurrence of a character in a string. | |
| NS_HIDDEN_ (void) AppendInt(int aInt | |
| Append a string representation of a number. | |
| NS_HIDDEN_ (PRInt32) ToInteger(nsresult *aErrorCode | |
| Convert this string to an integer. | |
Static Public Member Functions | |
| static | NS_HIDDEN_ (PRInt32) DefaultComparator(const char_type *a |
Public Attributes | |
| const char_type ** | end = nsnull) const |
| char_type ** | end = nsnull |
| char_type PRUint32 | newSize = PR_UINT32_MAX) |
| size_type | aLength |
| PRBool | aLeading = PR_TRUE |
| PRBool PRBool | aTrailing = PR_TRUE) |
| static const char_type * | b |
| static const char_type PRUint32 | length |
| ComparatorFunc | c = DefaultComparator ) const |
| PRBool | aIgnoreCase |
| PRUint32 | aOffset = 0) const |
| PRInt32 | aRadix = 10) |
| PRUint32 | aRadix = 10) const |
Protected Member Functions | |
| ~nsAString () | |
| typedef PRUnichar nsAString::char_type |
| typedef nsAString nsAString::self_type |
Reimplemented in nsString, nsDependentString, NS_ConvertASCIItoUTF16, NS_ConvertUTF8toUTF16, and nsDependentSubstring.
| typedef PRUint32 nsAString::size_type |
| typedef PRUint32 nsAString::index_type |
| typedef PRInt32(* nsAString::ComparatorFunc)(const char_type *a, const char_type *b, PRUint32 length) |
Return 0 if the characters are equal,
| nsAString::~nsAString | ( | ) | [inline, protected] |
| nsAString::NS_HIDDEN_ | ( | PRUint32 | ) | const |
| nsAString::NS_HIDDEN_ | ( | char_type | ) | const [inline] |
| nsAString::NS_HIDDEN_ | ( | char_type | ) | const [inline] |
| nsAString::NS_HIDDEN_ | ( | char_type | ) | const [inline] |
| nsAString::NS_HIDDEN_ | ( | PRUint32 | ) |
| newSize | Size the string to this length. Pass PR_UINT32_MAX to leave the length unchanged. |
| nsAString::NS_HIDDEN_ | ( | char_type * | ) |
| nsAString::NS_HIDDEN_ | ( | char_type * | ) |
| nsAString::NS_HIDDEN_ | ( | PRBool | ) |
| nsAString::NS_HIDDEN_ | ( | size_type | ) | const [inline] |
| nsAString::NS_HIDDEN_ | ( | PRBool | ) | const [inline] |
| nsAString::NS_HIDDEN_ | ( | void | ) | [inline] |
| nsAString::NS_HIDDEN_ | ( | PRBool | ) | const [inline] |
| nsAString::NS_HIDDEN_ | ( | void | ) | const [inline] |
| nsAString::NS_HIDDEN_ | ( | void | ) | const |
| nsAString::NS_HIDDEN_ | ( | self_type & | ) |
| nsAString::NS_HIDDEN_ | ( | self_type & | ) |
| nsAString::NS_HIDDEN_ | ( | void | ) | [inline] |
| nsAString::NS_HIDDEN_ | ( | void | ) | const |
| static nsAString::NS_HIDDEN_ | ( | PRInt32 | ) | const [static] |
| nsAString::NS_HIDDEN_ | ( | PRInt32 | ) | const |
| nsAString::NS_HIDDEN_ | ( | PRInt32 | ) | const |
| nsAString::NS_HIDDEN_ | ( | PRBool | ) | const |
| nsAString::NS_HIDDEN_ | ( | PRBool | ) | const |
| nsAString::NS_HIDDEN_ | ( | PRBool | ) | const [inline] |
| nsAString::NS_HIDDEN_ | ( | PRBool | ) | const [inline] |
| nsAString::NS_HIDDEN_ | ( | PRBool | ) |
| nsAString::NS_HIDDEN_ | ( | PRBool | ) | const |
| nsAString::NS_HIDDEN_ | ( | PRInt32 | ) | const |
| nsAString::NS_HIDDEN_ | ( | PRInt32 | ) | const |
| nsAString::NS_HIDDEN_ | ( | PRInt32 | ) | const |
| nsAString::NS_HIDDEN_ | ( | PRInt32 | ) | const |
| nsAString::NS_HIDDEN_ | ( | PRInt32 | ) |
| aOffset | the offset from the beginning of the string to begin searching |
| nsAString::NS_HIDDEN_ | ( | PRInt32 | ) | const |
| nsAString::NS_HIDDEN_ | ( | void | ) |
| nsAString::NS_HIDDEN_ | ( | PRInt32 | ) |
| aErrorCode | pointer to contain result code. | |
| aRadix | must be 10 or 16 |
| char_type PRUint32 nsAString::newSize = PR_UINT32_MAX) |
Initial value:
PR_UINT32_MAX)
{
NS_StringSetData(*this, aData, aLength);
}
NS_HIDDEN_(void) Assign(char_type aChar)
{
NS_StringSetData(*this, &aChar, 1);
}
NS_HIDDEN_(void) AssignLiteral(const char *aStr)
| ComparatorFunc nsAString::c = DefaultComparator ) const |
Initial value:
PR_FALSE) const { return Find(aStr, 0, aIgnoreCase); } NS_HIDDEN_(PRInt32) Find(const char *aStr, PRUint32 aOffset, PRBool aIgnoreCase = PR_FALSE) const
| PRInt32 nsAString::aRadix = 10) |
| PRUint32 nsAString::aRadix = 10) const |
1.5.6