strm_string_alloc()

Allocate a new shareable string object

Synopsis:

#include <strm.h>

char *strm_string_alloc( size_t len, strm_string_t **handle );

Arguments:

len
The length of the string to make room for, not including the terminating '\0' character.
handle
A pointer to a variable where the new string handle will be stored.

Library:

libstrm

Description:

The function strm_string_alloc() allocates a new shareable string object to be filled in by the caller. The caller must put a null-terminated string in the buffer of the new string object before calling any of the functions strm_string_clone(), strm_string_modify(), or strm_string_destroy(), and must not modify the buffer afterwards.

Returns:

A pointer to the first byte of the new string object's string buffer, or a null pointer on error. The new string handle is stored in the variable pointed to by the function argument handle.

Classification:

QNX Neutrino

Safety:  
Interrupt handler No
Signal handler No
Thread Yes