nsDependentSubstring 编辑
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
Method Overview
Base Classes
Data Members
No public members.
Methods
Constructors
void nsDependentSubstring(const nsAString_internal&, PRUint32, PRUint32)
- sourceParameters
- nsAString_internal& str
- PRUint32 startPos
- PRUint32 length
void nsDependentSubstring(const PRUnichar*, const PRUnichar*)
- sourceParameters
- PRUnichar* start
- PRUnichar* end
void nsDependentSubstring(const nsReadingIterator<short unsigned int>&, const nsReadingIterator<short unsigned int>&)
- sourceParameters
- nsReadingIterator<short unsigned int>& start
- nsReadingIterator<short unsigned int>& end
void nsDependentSubstring()
- source
Rebind
void Rebind(const nsAString_internal&, PRUint32, PRUint32)
- sourceParameters
- nsAString_internal& <anonymous>
- PRUint32 startPos
- PRUint32 length
void Rebind(const PRUnichar*, const PRUnichar*)
- sourceParameters
- PRUnichar* start
- PRUnichar* end
BeginReading
PRUnichar* BeginReading() const
- sourcereading iterators
nsReadingIterator<short unsigned int>& BeginReading(nsReadingIterator<short unsigned int>&) const
- sourcedeprecated reading iterators
Parameters
- nsReadingIterator<short unsigned int>& iter
PRUnichar*& BeginReading(const PRUnichar*&) const
- sourceParameters
- PRUnichar*& iter
EndReading
PRUnichar* EndReading() const
- sourcensReadingIterator<short unsigned int>& EndReading(nsReadingIterator<short unsigned int>&) const
- sourceParameters
- nsReadingIterator<short unsigned int>& iter
PRUnichar*& EndReading(const PRUnichar*&) const
- sourceParameters
- PRUnichar*& iter
BeginWriting
PRUnichar* BeginWriting()
- sourcewriting iterators
nsWritingIterator<short unsigned int>& BeginWriting(nsWritingIterator<short unsigned int>&)
- sourcedeprecated writing iterators
Parameters
- nsWritingIterator<short unsigned int>& iter
PRUnichar*& BeginWriting(PRUnichar*&)
- sourceParameters
- PRUnichar*& iter
EndWriting
PRUnichar* EndWriting()
- sourcensWritingIterator<short unsigned int>& EndWriting(nsWritingIterator<short unsigned int>&)
- sourceParameters
- nsWritingIterator<short unsigned int>& iter
PRUnichar*& EndWriting(PRUnichar*&)
- sourceParameters
- PRUnichar*& iter
Data
PRUnichar* Data() const
- sourceaccessors
Length
PRUint32 Length() const
- source
IsEmpty
PRBool IsEmpty() const
- source
IsVoid
PRBool IsVoid() const
- source
IsTerminated
PRBool IsTerminated() const
- source
CharAt
PRUnichar CharAt(PRUint32) const
- sourceParameters
- PRUint32 i
operator[]
PRUnichar operator[](PRUint32) const
- sourceParameters
- PRUint32 i
First
PRUnichar First() const
- source
Last
PRUnichar Last() const
- source
CountChar
PRUint32 CountChar(PRUnichar) const
- sourceParameters
- PRUnichar <anonymous>
FindChar
PRInt32 FindChar(PRUnichar, PRUint32) const
- sourceParameters
- PRUnichar <anonymous>
- PRUint32 offset
Equals
PRBool Equals(const nsAString_internal&) const
- sourceequality
Parameters
- nsAString_internal& <anonymous>
PRBool Equals(const nsAString_internal&, const nsStringComparator&) const
- sourceParameters
- nsAString_internal& <anonymous>
- nsStringComparator& <anonymous>
PRBool Equals(const PRUnichar*) const
- sourceParameters
- PRUnichar* data
PRBool Equals(const PRUnichar*, const nsStringComparator&) const
- sourceParameters
- PRUnichar* data
- nsStringComparator& comp
EqualsASCII
PRBool EqualsASCII(const char*, PRUint32) const
- sourceAn efficient comparison with ASCII that can be used even for wide strings. Call this version when you know the length of 'data'.
Parameters
- char* data
- PRUint32 len
PRBool EqualsASCII(const char*) const
- sourceAn efficient comparison with ASCII that can be used even for wide strings. Call this version when 'data' is null-terminated.
Parameters
- char* data
EqualsLiteral(const char
PRBool EqualsLiteral(const char (&)[N]) const
- source
EqualsLiteral(char
PRBool EqualsLiteral(char (&)[N]) const
- source
LowerCaseEqualsASCII
PRBool LowerCaseEqualsASCII(const char*, PRUint32) const
- sourceParameters
- char* data
- PRUint32 len
PRBool LowerCaseEqualsASCII(const char*) const
- sourceParameters
- char* data
LowerCaseEqualsLiteral(const char
PRBool LowerCaseEqualsLiteral(const char (&)[N]) const
- source
LowerCaseEqualsLiteral(char
PRBool LowerCaseEqualsLiteral(char (&)[N]) const
- source
Assign
void Assign(PRUnichar)
- sourceassignment
Parameters
- PRUnichar c
void Assign(const PRUnichar*, PRUint32)
- sourceParameters
- PRUnichar* data
- PRUint32 length
void Assign(const nsAString_internal&)
- sourceParameters
- nsAString_internal& <anonymous>
void Assign(const nsSubstringTuple&)
- sourceParameters
- nsSubstringTuple& <anonymous>
AssignASCII
void AssignASCII(const char*, PRUint32)
- sourceParameters
- char* data
- PRUint32 length
void AssignASCII(const char*)
- sourceParameters
- char* data
AssignLiteral(const char
void AssignLiteral(const char (&)[N])
- source
AssignLiteral(char
void AssignLiteral(char (&)[N])
- source
operator=
nsAString_internal& operator=(PRUnichar)
- sourceParameters
- PRUnichar c
nsAString_internal& operator=(const PRUnichar*)
- sourceParameters
- PRUnichar* data
nsAString_internal& operator=(const nsAString_internal&)
- sourceParameters
- nsAString_internal& str
nsAString_internal& operator=(const nsSubstringTuple&)
- sourceParameters
- nsSubstringTuple& tuple
Adopt
void Adopt(PRUnichar*, PRUint32)
- sourceParameters
- PRUnichar* data
- PRUint32 length
Replace
void Replace(PRUint32, PRUint32, PRUnichar)
- sourcebuffer manipulation
Parameters
- PRUint32 cutStart
- PRUint32 cutLength
- PRUnichar c
void Replace(PRUint32, PRUint32, const PRUnichar*, PRUint32)
- sourceParameters
- PRUint32 cutStart
- PRUint32 cutLength
- PRUnichar* data
- PRUint32 length
void Replace(PRUint32, PRUint32, const nsAString_internal&)
- sourceParameters
- PRUint32 cutStart
- PRUint32 cutLength
- nsAString_internal& str
void Replace(PRUint32, PRUint32, const nsSubstringTuple&)
- sourceParameters
- PRUint32 cutStart
- PRUint32 cutLength
- nsSubstringTuple& tuple
ReplaceASCII
void ReplaceASCII(PRUint32, PRUint32, const char*, PRUint32)
- sourceParameters
- PRUint32 cutStart
- PRUint32 cutLength
- char* data
- PRUint32 length
Append
void Append(PRUnichar)
- sourceParameters
- PRUnichar c
void Append(const PRUnichar*, PRUint32)
- sourceParameters
- PRUnichar* data
- PRUint32 length
void Append(const nsAString_internal&)
- sourceParameters
- nsAString_internal& str
void Append(const nsSubstringTuple&)
- sourceParameters
- nsSubstringTuple& tuple
AppendASCII
void AppendASCII(const char*, PRUint32)
- sourceParameters
- char* data
- PRUint32 length
AppendLiteral(const char
void AppendLiteral(const char (&)[N])
- source
AppendLiteral(char
void AppendLiteral(char (&)[N])
- source
operator+=
nsAString_internal& operator+=(PRUnichar)
- sourceParameters
- PRUnichar c
nsAString_internal& operator+=(const PRUnichar*)
- sourceParameters
- PRUnichar* data
nsAString_internal& operator+=(const nsAString_internal&)
- sourceParameters
- nsAString_internal& str
nsAString_internal& operator+=(const nsSubstringTuple&)
- sourceParameters
- nsSubstringTuple& tuple
Insert
void Insert(PRUnichar, PRUint32)
- sourceParameters
- PRUnichar c
- PRUint32 pos
void Insert(const PRUnichar*, PRUint32, PRUint32)
- sourceParameters
- PRUnichar* data
- PRUint32 pos
- PRUint32 length
void Insert(const nsAString_internal&, PRUint32)
- sourceParameters
- nsAString_internal& str
- PRUint32 pos
void Insert(const nsSubstringTuple&, PRUint32)
- sourceParameters
- nsSubstringTuple& tuple
- PRUint32 pos
Cut
void Cut(PRUint32, PRUint32)
- sourceParameters
- PRUint32 cutStart
- PRUint32 cutLength
SetCapacity
void SetCapacity(PRUint32)
- sourcebuffer sizing
Parameters
- PRUint32 newCapacity
SetLength
void SetLength(PRUint32)
- sourceParameters
- PRUint32 newLength
Truncate
void Truncate(PRUint32)
- sourceParameters
- PRUint32 newLength
GetData
PRUint32 GetData(const PRUnichar**) const
- sourceGet 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.
Parameters
- PRUnichar** data
GetMutableData
PRUint32 GetMutableData(PRUnichar**, PRUint32)
- sourceGet 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.
Parameters
- PRUnichar** data
- PRUint32 newLen
SetIsVoid
void SetIsVoid(PRBool)
- sourcestring data is never null, but can be marked void. if true, the string will be truncated. @see nsTSubstring::IsVoid
Parameters
- PRBool <anonymous>
StripChar
void StripChar(PRUnichar, PRInt32)
- sourceThis 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
Parameters
- PRUnichar aChar
- PRInt32 aOffset
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论