Please note, this is a STATIC archive of website developer.mozilla.org from 03 Nov 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

NS_StringCloneData

« XPCOM API Reference

Summary

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

  #include "nsStringAPI.h"

  PRUnichar* NS_StringCloneData(
    const nsAString& aString
  );

Parameters

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

Return Values

The NS_StringCutData 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.

History

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

See Also

nsMemory::Free, nsAString

Document Tags and Contributors

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