Method Overview
Base Classes
Data Members
No public members.
Methods
Constructors
get
-
char* get() const
- source
operator=
-
nsCString_external& operator=(const nsCString_external&)
- source -
Parameters
- nsCString_external& aString
-
nsACString& operator=(const nsACString&)
- source -
Parameters
- nsACString& aString
-
nsACString& operator=(const char*)
- source -
Parameters
- char* aPtr
-
nsACString& operator=(char)
- source -
Parameters
- char aChar
Adopt
-
void Adopt(const char*, PRUint32)
- source -
Parameters
- char* aData
- PRUint32 aLength
BeginReading
EndReading
-
char* EndReading() const
- source
CharAt
-
char CharAt(PRUint32) const
- source -
Parameters
- PRUint32 aPos
operator[]
-
char operator[](PRUint32) const
- source -
Parameters
- PRUint32 aPos
First
-
char First() const
- source
BeginWriting
-
PRUint32 BeginWriting(char**, char**, PRUint32)
- source -
Get the length, begin writing, and optionally set the length of a string all in one operation. @param newSize Size the string to this length. Pass PR_UINT32_MAX to leave the length unchanged. @return The new length of the string, or 0 if resizing failed.
Parameters
- char** begin
- char** end
- PRUint32 newSize
-
char* BeginWriting(PRUint32)
- source -
Parameters
- PRUint32 aLen
EndWriting
-
char* EndWriting()
- source
SetLength
-
PRBool SetLength(PRUint32)
- source -
Parameters
- PRUint32 aLen
Length
-
PRUint32 Length() const
- source
IsEmpty
-
PRBool IsEmpty() const
- source
SetIsVoid
-
void SetIsVoid(PRBool)
- source -
Parameters
- PRBool val
IsVoid
-
PRBool IsVoid() const
- source
Assign
AssignLiteral
-
void AssignLiteral(const char*)
- source -
Parameters
- char* aData
Replace
-
void Replace(PRUint32, PRUint32, const char*, PRUint32)
- source -
Parameters
- PRUint32 cutStart
- PRUint32 cutLength
- char* data
- PRUint32 length
-
void Replace(PRUint32, PRUint32, char)
- source -
Parameters
- PRUint32 cutStart
- PRUint32 cutLength
- char c
-
void Replace(PRUint32, PRUint32, const nsACString&)
- source -
Parameters
- PRUint32 cutStart
- PRUint32 cutLength
- nsACString& readable
Append
AppendLiteral
-
void AppendLiteral(const char*)
- source -
Parameters
- char* aASCIIStr
operator+=
Insert
Cut
-
void Cut(PRUint32, PRUint32)
- source -
Parameters
- PRUint32 cutStart
- PRUint32 cutLength
Truncate
-
void Truncate()
- source
StripChars
-
void StripChars(const char*)
- source -
Remove all occurrences of characters in aSet from the string.
Parameters
- char* aSet
StripWhitespace
-
void StripWhitespace()
- source -
Strip whitespace characters from the string.
Trim
-
void Trim(const char*, PRBool, PRBool)
- source -
Parameters
- char* aSet
- PRBool aLeading
- PRBool aTrailing
DefaultComparator
-
PRInt32 DefaultComparator(const char*, const char*, PRUint32)
- source -
Parameters
- char* a
- char* b
- PRUint32 length
Compare
-
PRInt32 Compare(const char*, PRInt32 (*)(const char*, const char*, PRUint32)) const
- source -
Parameters
- char* other
- PRInt32 (*)(char*, char*, PRUint32) c
-
PRInt32 Compare(const nsACString&, PRInt32 (*)(const char*, const char*, PRUint32)) const
- source -
Parameters
- nsACString& other
- PRInt32 (*)(char*, char*, PRUint32) c
Equals
-
PRBool Equals(const char*, PRInt32 (*)(const char*, const char*, PRUint32)) const
- source -
Parameters
- char* other
- PRInt32 (*)(char*, char*, PRUint32) c
-
PRBool Equals(const nsACString&, PRInt32 (*)(const char*, const char*, PRUint32)) const
- source -
Parameters
- nsACString& other
- PRInt32 (*)(char*, char*, PRUint32) c
operator<
operator<=
operator==
operator>=
operator>
operator!=
EqualsLiteral
-
PRBool EqualsLiteral(const char*) const
- source -
Parameters
- char* other
Find
-
PRInt32 Find(const nsACString&, PRInt32 (*)(const char*, const char*, PRUint32)) const
- source -
Find the first occurrence of aStr in this string. @return the offset of aStr, or -1 if not found
Parameters
- nsACString& aStr
- PRInt32 (*)(char*, char*, PRUint32) c
-
PRInt32 Find(const nsACString&, PRUint32, PRInt32 (*)(const char*, const char*, PRUint32)) const
- source -
Find the first occurrence of aStr in this string, beginning at aOffset. @return the offset of aStr, or -1 if not found
Parameters
- nsACString& aStr
- PRUint32 aOffset
- PRInt32 (*)(char*, char*, PRUint32) c
-
PRInt32 Find(const char*, PRInt32 (*)(const char*, const char*, PRUint32)) const
- source -
Find the first occurrence of aStr in this string. @return the offset of aStr, or -1 if not found
Parameters
- char* aStr
- PRInt32 (*)(char*, char*, PRUint32) c
-
PRInt32 Find(const char*, PRUint32, PRInt32 (*)(const char*, const char*, PRUint32)) const
- source -
Parameters
- char* aStr
- PRUint32 aLen
- PRInt32 (*)(char*, char*, PRUint32) c
RFind
-
PRInt32 RFind(const nsACString&, PRInt32 (*)(const char*, const char*, PRUint32)) const
- source -
Find the last occurrence of aStr in this string. @return The offset of the character from the beginning of the string, or -1 if not found.
Parameters
- nsACString& aStr
- PRInt32 (*)(char*, char*, PRUint32) c
-
PRInt32 RFind(const nsACString&, PRInt32, PRInt32 (*)(const char*, const char*, PRUint32)) const
- source -
Find the last occurrence of aStr in this string, beginning at aOffset. @param aOffset the offset from the beginning of the string to begin searching. If aOffset < 0, search from end of this string. @return The offset of aStr from the beginning of the string, or -1 if not found.
Parameters
- nsACString& aStr
- PRInt32 aOffset
- PRInt32 (*)(char*, char*, PRUint32) c
-
PRInt32 RFind(const char*, PRInt32 (*)(const char*, const char*, PRUint32)) const
- source -
Find the last occurrence of aStr in this string. @return The offset of aStr from the beginning of the string, or -1 if not found.
Parameters
- char* aStr
- PRInt32 (*)(char*, char*, PRUint32) c
-
PRInt32 RFind(const char*, PRInt32, PRInt32 (*)(const char*, const char*, PRUint32)) const
- source -
Find the last occurrence of an ASCII string in this string, beginning at aOffset. @param aLen is the length of aStr @return The offset of aStr from the beginning of the string, or -1 if not found.
Parameters
- char* aStr
- PRInt32 aLen
- PRInt32 (*)(char*, char*, PRUint32) c
FindChar
-
PRInt32 FindChar(char, PRUint32) const
- source -
Search for the offset of the first occurrence of a character in a string. @param aOffset the offset from the beginning of the string to begin searching @return The offset of the character from the beginning of the string, or -1 if not found.
Parameters
- char aChar
- PRUint32 aOffset
RFindChar
-
PRInt32 RFindChar(char) const
- source -
Search for the offset of the last occurrence of a character in a string. @return The offset of the character from the beginning of the string, or -1 if not found.
Parameters
- char aChar
AppendInt
-
void AppendInt(int, PRInt32)
- source -
Append a string representation of a number.
Parameters
- int aInt
- PRInt32 aRadix
ToInteger
-
PRInt32 ToInteger(nsresult*, PRUint32) const
- source -
Convert this string to an integer. @param aErrorCode pointer to contain result code. @param aRadix must be 10 or 16
Parameters
- nsresult* aErrorCode
- PRUint32 aRadix