Function libyml::string::yaml_string_join

source ·
pub unsafe fn yaml_string_join(
    a_start: *mut *mut u8,
    a_pointer: *mut *mut u8,
    a_end: *mut *mut u8,
    b_start: *mut *mut u8,
    b_pointer: *mut *mut u8,
    b_end: *mut *mut u8,
)
Expand description

Join two string buffers by copying data from one to the other.

This function is used to concatenate two string buffers.

§Safety

  • This function is unsafe because it directly calls the system’s memcpy function, which can lead to undefined behaviour if misused.
  • The caller must ensure that a_start, a_pointer, a_end, b_start, b_pointer, and b_end are valid pointers into their respective allocated memory blocks.
  • The caller must ensure that the memory blocks being joined are large enough to accommodate the combined data.
  • The caller is responsible for properly freeing the joined memory block using the corresponding yaml_free function when it is no longer needed.