strm_string_alloc()

Allocate a new shareable string object.

Synopsis:

#include <sys/strm.h>
 
char* strm_string_alloc(size_t len,
                        strm_string_t **handle)

Since:

BlackBerry 10.0.0

Arguments:

len

The length of the string to make room for, not including the terminating '\0'

handle

A pointer to a variable where the new string handle will be stored.

Library:

libstrm (For the qcc command, use the -l mrndclient option to link against this library)

Description:

This function 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 handle.