Skip to main content

xmlMemoryStrdup

Function xmlMemoryStrdup 

Source
#[unsafe(no_mangle)]
pub unsafe extern "C" fn xmlMemoryStrdup( str: *const c_char, ) -> *mut c_void
Expand description

Duplicate a string through the debug allocator (upstream xmlmemory.h).

void *xmlMemoryStrdup(const char *str);

NULL returns NULL (upstream xmlPosixStrdup/xmlCharStrdup contract).

ยงSAFETY

  • str must point to a valid NUL-terminated string, or NULL
  • The returned pointer must be freed with xmlMemFree (or xmlFree)