Skip to main content

xmlMemStrdup

Function xmlMemStrdup 

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

Duplicate a C string using the configured allocator.

§UPSTREAM-PARITY

void *xmlMemStrdup(const char *str);

Returns a pointer to the newly allocated copy, or NULL on failure.

§SAFETY

  • str must be a valid null-terminated C string or NULL
  • The returned pointer must be freed with xmlFree