Summary
The Replace
family of functions sets the value of a string's internal buffer.
void Replace( index_type aCutStart, index_type aCutLength, const self_type& aString );
Parameters
- aCutStart
- [in] The starting index of the section to remove, measured in storage units.
- aCutLength
- [in] The length of the section to remove, measured in storage units.
- aString
- [in] A nsACString to append to this string.
void Replace( index_type aCutStart, size_type aCutLength, const char_type* aData, size_type aDataLength = PR_UINT32_MAX );
Parameters
- aCutStart
- [in] The starting index of the section to remove, measured in storage units.
- aCutLength
- [in] The length of the section to remove, measured in storage units.
- aData
- [in] A raw character array to append to this string.
- aDataLength
- [in] The length of aData, measured in storage units. If equal to PR_UINT32_MAX, then aData is assumed to be null-terminated. Otherwise, aData need not be null terminated.
void Replace( index_type aCutStart, index_type aCutLength, char_type aChar );
Parameters
- aCutStart
- [in] The starting index of the section to remove, measured in storage units.
- aCutLength
- [in] The length of the section to remove, measured in storage units.
- aChar
- [in] A character to append to this string.
Remarks
If insufficient memory is available to perform the assignment, then the string's internal buffer will point to a static empty (zero-length) buffer.