Visit Mozilla.org

NS StringCloneData

From MDC


« XPCOM API Reference

Contents

[edit] 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
  );

[edit] Parameters

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

[edit] 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.

[edit] History

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

[edit] See Also

nsMemory::Free, nsAString