libplist  2.7.0
API Documentation - Return to Homepage

◆ plist_write_to_string()

PLIST_API plist_err_t plist_write_to_string ( plist_t  plist,
char **  output,
uint32_t *  length,
plist_format_t  format,
plist_write_options_t  options 
)

Write the plist_t structure to a NULL-terminated string using the given format and options.

Parameters
plistThe input plist structure
outputPointer to a char* buffer. This function allocates the memory, caller is responsible for freeing it.
lengthA pointer to a uint32_t value that will receive the lenght of the allocated buffer.
formatA plist_format_t value that specifies the output format to use.
optionsOne or more bitwise ORed values of plist_write_options_t.
Returns
PLIST_ERR_SUCCESS on success or a plist_err_t on failure.
Note
Use plist_mem_free() to free the allocated memory.
PLIST_FORMAT_BINARY is not supported by this function.