straddstr()

Concatenate one string on to the end of another

Synopsis:

#include <string.h>

int straddstr( const char * str, 
               int len, 
               char ** pbuf, 
               size_t * pmaxbuf );

Arguments:

str
The string that you want to add to the end of another.
len
The number of characters from str that you want to add. If zero, the function adds all of str.
pbuf
The address of a pointer to the destination buffer.
pmaxbuf
A pointer to the size of the destination buffer.

Library:

libc

Use the -l c option to qcc to link against this library. This library is usually included automatically.

Description:

The straddstr() function adds str to the buffer pointed to by pbuf, respecting the maximum length indicated by pmaxbuf. The values of pbuf and pmaxlen are also updated.

Returns:

The value of len if it's nonzero; otherwise, the length of str (i.e. strlen(str)).

Classification:

QNX Neutrino

Safety:
Cancellation point No
Interrupt handler Yes
Signal handler Yes
Thread Yes

See also:

strcat(), strcpy(), strncat(), strncpy()