strm_string_modify()

Modify a shareable string object (destroying the existing handle)

Synopsis:

#include <strm.h>

strm_string_t *strm_string_modify( strm_string_t *sstr,
                                   const char *cstring );

Arguments:

sstr
A handle to a shareable string object.
cstring
A pointer to a null-terminated string.

Library:

libstrm

Description:

The function strm_string_modify() creates a new shareable string object from the string passed in the cstring argument, and returns a new handle to the new string object. Calling strm_string_modify() is equivalent to calling strm_string_destroy() and strm_string_make(), except that it may reuse the original object's memory. The shareable string object handle passed in the sstr argument is consumed, even on failure.

Returns:

A new handle to the new shareable string object on success, or a null pointer on failure (errno is set).

Classification:

QNX Neutrino

Safety:  
Interrupt handler No
Signal handler No
Thread Yes