We're looking for a user researcher to understand the needs of developers and designers. Is this you or someone you know? Check out the post: https://mzl.la/2IGzdXS


« XPCOM API Reference


The NS_CStringCloneData function returns a null-terminated, heap allocated copy of the string's internal buffer.

  #include "nsStringAPI.h"

  char* NS_CStringCloneData(
    const nsACString& aString


[in] A nsACString instance whose data is to be cloned.

Return Values

The NS_CStringCutData function returns a pointer to a null-terminated, heap allocated buffer on success. On failure it returns nsnull. The resulting buffer may be freed by calling nsMemory::Free.


This function was frozen for Mozilla 1.7. See bug 239716 for details.

See Also

nsMemory::Free, nsACString

Document Tags and Contributors

Contributors to this page: Sheppy, Pmash
Last updated by: Sheppy,