Updated: October 28, 2024 |
Modify the string stored in a shareable string
#include <sys/strm.h>
strm_string_t* strm_string_modify(strm_string_t *sstr, const char *cstring)
This function modifies the string stored in a shareable string, by destroying the original object referenced by sstr and creating a new object containing the string in cstring.
Calling this function is equivalent to calling strm_string_destroy() and strm_string_make() except that it may reuse the memory of the original object. Note that the passed-in shareable string handle is consumed, even on failure.
On success, a handle to the new shareable string. On failure, a null pointer (errno is set).