XPCOM provides these low-level string functions to let you work with strings; however, it's often better to use one of the string classes rather than directly using these functions.
- NS_CStringAppendData
- The
NS_CStringAppendDatafunction appends data to the existing value of ansACStringinstance. This is a low-level API. - NS_CStringCloneData
- The
NS_CStringCloneDatafunction returns a null-terminated, heap allocated copy of the string's internal buffer. - NS_CStringContainerFinish
- The
NS_CStringContainerFinishfunction releases any memory allocated by ansCStringContainerinstance. - NS_CStringContainerInit
- The
NS_CStringContainerInitfunction initializes ansCStringContainerinstance for use as ansACString. - NS_CStringContainerInit2
- The
NS_CStringContainerInit2function initializes ansCStringContainerinstance for use as ansACString. - NS_CStringCopy
- The
NS_CStringCopyfunction copies the value from onensACStringinstance to another. This is a low-level API. - NS_CStringCutData
- The
NS_CStringCutDatafunction removes a section of the string's internal buffer. This is a low-level API. - NS_CStringGetData
- The
NS_CStringGetDatafunction gives the caller read access to the string's internal buffer. - NS_CStringGetMutableData
- The
NS_CStringGetMutableDatafunction gives the caller write access to the string's internal buffer. - NS_CStringInsertData
- The
NS_CStringInsertDatafunction appends data to the existing value of ansACStringinstance. This is a low-level API. - NS_CStringSetData
- The
NS_CStringSetDatafunction copies data into the string's internal buffer. This is a low-level API. - NS_CStringSetDataRange
- The
NS_CStringSetDataRangefunction copies data into a section of the string's internal buffer. This is a low-level API. - NS_CStringToUTF16
- The
NS_CStringToUTF16function converts the value of ansACStringinstance to UTF-16 and stores the result in ansAStringinstance.
- NS_StringAppendData
- The
NS_StringAppendDatafunction appends data to the existing value of ansAStringinstance. This is a low-level API. - NS_StringCloneData
- The
NS_StringCloneDatafunction returns a null-terminated, heap allocated copy of the string's internal buffer. - NS_StringContainerFinish
- The
NS_StringContainerFinishfunction releases any memory allocated by ansStringContainerinstance. This is a low-level API. - NS_StringContainerInit
- The
NS_StringContainerInitfunction initializes ansStringContainerinstance for use as ansAString. This is a low-level API. - NS_StringCopy
- The
NS_StringCopyfunction copies the value from one nsAString instance to another. This is a low-level API. - NS_StringCutData
- The
NS_StringCutDatafunction removes a section of the string's internal buffer. This is a low-level API. - NS_StringGetData
- The
NS_StringGetDatafunction gives the caller access to the string's internal buffer. This is a low-level API. - NS_StringInsertData
- The
NS_StringInsertDatafunction appends data to the existing value of ansACStringinstance. This is a low-level API. - NS_StringSetData
- The
NS_StringSetDatafunction copies data into the string's internal buffer. This is a low-level API. - NS_StringSetDataRange
- The
NS_StringSetDataRangefunction copies data into a section of the string's internal buffer. This is a low-level API. - NS_UTF16ToCString
- The
NS_UTF16ToCStringfunction converts the value of ansAStringinstance from UTF-16 to the specified multi-byte encoding and stores the result in ansACStringinstance.
