nsTDependentSubstring_CharT A string class which wraps an external array of string characters. It is the client code's responsibility to ensure that the external buffer remains valid for a long as the string is alive. NAMES: nsDependentSubstring for wide characters nsDependentCSubstring for narrow characters
No public members.
void nsDependentCSubstring(const nsACString_internal&, PRUint32, PRUint32)
- source void nsDependentCSubstring(const char*, const char*)
- source void nsDependentCSubstring(const nsReadingIterator<char>&, const nsReadingIterator<char>&)
- source void nsDependentCSubstring()
- source char* Data() const
- source accessors
PRUint32 Length() const
- source PRBool IsEmpty() const
- source PRBool IsVoid() const
- source PRBool IsTerminated() const
- source char CharAt(PRUint32) const
- source char operator[](PRUint32) const
- source char First() const
- source char Last() const
- source PRUint32 CountChar(char) const
- source PRInt32 FindChar(char, PRUint32) const
- source PRBool Equals(const nsACString_internal&) const
- source equality
PRBool Equals(const nsACString_internal&, const nsCStringComparator&) const
- source PRBool Equals(const char*) const
- source PRBool Equals(const char*, const nsCStringComparator&) const
- source PRBool EqualsASCII(const char*, PRUint32) const
- source An efficient comparison with ASCII that can be used even for wide strings. Call this version when you know the length of 'data'.
PRBool EqualsASCII(const char*) const
- source An efficient comparison with ASCII that can be used even for wide strings. Call this version when 'data' is null-terminated.
PRBool EqualsLiteral(const char (&)[N]) const
- source PRBool EqualsLiteral(char (&)[N]) const
- source PRBool LowerCaseEqualsLiteral(const char (&)[N]) const
- source PRBool LowerCaseEqualsLiteral(char (&)[N]) const
- source void Assign(char)
- source assignment
void Assign(const char*, PRUint32)
- source void Assign(const nsACString_internal&)
- source void Assign(const nsCSubstringTuple&)
- source void AssignLiteral(const char (&)[N])
- source void AssignLiteral(char (&)[N])
- source nsACString_internal& operator=(char)
- source nsACString_internal& operator=(const char*)
- source nsACString_internal& operator=(const nsACString_internal&)
- source nsACString_internal& operator=(const nsCSubstringTuple&)
- source void Adopt(char*, PRUint32)
- source void Replace(PRUint32, PRUint32, char)
- source buffer manipulation
void Replace(PRUint32, PRUint32, const char*, PRUint32)
- source void Replace(PRUint32, PRUint32, const nsACString_internal&)
- source void Replace(PRUint32, PRUint32, const nsCSubstringTuple&)
- source void ReplaceASCII(PRUint32, PRUint32, const char*, PRUint32)
- source void AppendASCII(const char*, PRUint32)
- source void AppendLiteral(const char (&)[N])
- source void AppendLiteral(char (&)[N])
- source nsACString_internal& operator+=(char)
- source nsACString_internal& operator+=(const char*)
- source nsACString_internal& operator+=(const nsACString_internal&)
- source nsACString_internal& operator+=(const nsCSubstringTuple&)
- source void Insert(char, PRUint32)
- source void Insert(const char*, PRUint32, PRUint32)
- source void Insert(const nsACString_internal&, PRUint32)
- source void Insert(const nsCSubstringTuple&, PRUint32)
- source void Cut(PRUint32, PRUint32)
- source void SetCapacity(PRUint32)
- source buffer sizing
void SetLength(PRUint32)
- source void Truncate(PRUint32)
- source PRUint32 GetData(const char**) const
- source Get a const pointer to the string's internal buffer. The caller MUST NOT modify the characters at the returned address. @returns The length of the buffer in characters.
PRUint32 GetMutableData(char**, PRUint32)
- source Get a pointer to the string's internal buffer, optionally resizing the buffer first. If size_type(-1) is passed for newLen, then the current length of the string is used. The caller MAY modify the characters at the returned address (up to but not exceeding the length of the string). @returns The length of the buffer in characters or 0 if unable to satisfy the request due to low-memory conditions.
void SetIsVoid(PRBool)
- source string data is never null, but can be marked void. if true, the string will be truncated. @see nsTSubstring::IsVoid
void StripChar(char, PRInt32)
- source This method is used to remove all occurrences of aChar from this string. @param aChar -- char to be stripped @param aOffset -- where in this string to start stripping chars