[Previous] [Contents] [Next]

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 );

Library:

libc

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.

The arguments are as follows:

str
New string to be added.
len
Length of str to be added. If zero, all of str is added.
pbuf
Pointer to the pointer of the destination buffer.
pmaxbuf
Pointer to the size of the destination buffer.

Returns:

If nonzero, len; otherwise, the number of characters attempted to be added (i.e. strlen(str)).

Classification:

QNX 6

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

See also:

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


[Previous] [Contents] [Next]