nsACString Class Reference

#include <nsStringAPI.h>

Inheritance diagram for nsACString:

Inheritance graph
[legend]
Collaboration diagram for nsACString:

Collaboration graph
[legend]

List of all members.

Public Types

typedef char char_type
typedef nsACString 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 aLen
 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_ (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_ (PRInt32) Find(const char_type *aStr
 Find the first occurrence of aStr in this string.
 NS_HIDDEN_ (PRInt32) Find(const char_type *aStr
 NS_HIDDEN_ (PRInt32) RFind(const self_type &aStr
 Find the last occurrence of aStr in this string.
 NS_HIDDEN_ (PRInt32) RFind(const char_type *aStr
 Find the last occurrence of aStr in this string.
 NS_HIDDEN_ (PRInt32) RFind(const char_type *aStr
 Find the last occurrence of an ASCII string in this string, beginning at aOffset.
 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_typeb
static const char_type PRUint32 length
ComparatorFunc c = DefaultComparator ) const
PRUint32 aLen
PRUint32 ComparatorFunc c = DefaultComparator) const
PRInt32 aLen
PRInt32 ComparatorFunc c = DefaultComparator) const
PRUint32 aOffset = 0) const
PRInt32 aRadix = 10)
PRUint32 aRadix = 10) const

Protected Member Functions

 ~nsACString ()


Member Typedef Documentation

Return 0 if the characters are equal,


Constructor & Destructor Documentation

nsACString::~nsACString (  )  [inline, protected]


Member Function Documentation

nsACString::NS_HIDDEN_ ( PRUint32   )  const

nsACString::NS_HIDDEN_ ( const char_type  )  const

nsACString::NS_HIDDEN_ ( const char_type  )  const

nsACString::NS_HIDDEN_ ( char_type   )  const [inline]

nsACString::NS_HIDDEN_ ( char_type   )  const [inline]

nsACString::NS_HIDDEN_ ( char_type   )  const [inline]

nsACString::NS_HIDDEN_ ( PRUint32   ) 

Parameters:
newSize Size the string to this length. Pass PR_UINT32_MAX to leave the length unchanged.
Returns:
The new length of the string, or 0 if resizing failed.

nsACString::NS_HIDDEN_ ( char_type  ) 

nsACString::NS_HIDDEN_ ( char_type  ) 

nsACString::NS_HIDDEN_ ( PRBool   ) 

nsACString::NS_HIDDEN_ ( size_type   )  const [inline]

nsACString::NS_HIDDEN_ ( PRBool   )  const [inline]

nsACString::NS_HIDDEN_ ( void   )  [inline]

nsACString::NS_HIDDEN_ ( PRBool   )  const [inline]

nsACString::NS_HIDDEN_ ( void   )  const [inline]

nsACString::NS_HIDDEN_ ( void   )  const

nsACString::NS_HIDDEN_ ( void   )  [inline]

nsACString::NS_HIDDEN_ ( void   )  const

static nsACString::NS_HIDDEN_ ( PRInt32   )  const [static]

nsACString::NS_HIDDEN_ ( PRInt32   )  const

nsACString::NS_HIDDEN_ ( PRInt32   )  const

nsACString::NS_HIDDEN_ ( PRBool   )  const

nsACString::NS_HIDDEN_ ( PRBool   )  const

nsACString::NS_HIDDEN_ ( PRBool   )  const [inline]

nsACString::NS_HIDDEN_ ( PRBool   )  const [inline]

nsACString::NS_HIDDEN_ ( PRBool   ) 

nsACString::NS_HIDDEN_ ( PRInt32   )  const

Returns:
the offset of aStr, or -1 if not found

nsACString::NS_HIDDEN_ ( PRInt32   )  const

nsACString::NS_HIDDEN_ ( PRInt32   )  const

Returns:
The offset of the character from the beginning of the string, or -1 if not found.

nsACString::NS_HIDDEN_ ( PRInt32   )  const

Returns:
The offset of aStr from the beginning of the string, or -1 if not found.

nsACString::NS_HIDDEN_ ( PRInt32   )  const

Parameters:
aLen is the length of aStr
Returns:
The offset of aStr from the beginning of the string, or -1 if not found.

nsACString::NS_HIDDEN_ ( PRInt32   ) 

Parameters:
aOffset the offset from the beginning of the string to begin searching
Returns:
The offset of the character from the beginning of the string, or -1 if not found.

nsACString::NS_HIDDEN_ ( PRInt32   )  const

Returns:
The offset of the character from the beginning of the string, or -1 if not found.

nsACString::NS_HIDDEN_ ( void   ) 

nsACString::NS_HIDDEN_ ( PRInt32   ) 

Parameters:
aErrorCode pointer to contain result code.
aRadix must be 10 or 16


Member Data Documentation

ComparatorFunc nsACString::c = DefaultComparator ) const

PRInt32 ComparatorFunc nsACString::c = DefaultComparator) const


The documentation for this class was generated from the following file:

Generated Mozilla by doxygen 1.5.6