Appends not more than maxchar characters from str_
2 to the end of str_1.
Format
#include <string.h>
char *strncat (char *str_1, const char *str_2,
size_t maxchar);
Function Variants
This function also has variants named _strncat32 and _strncat64
for use with 32-bit and 64-bit pointer sizes, respectively. See
Section 1.8 for more information on using
pointer-size-specific functions.
Arguments
- str_1, str_2
- Pointers to null-terminated character strings.
- maxchar
- The number of characters to concatenate from str_2,
unless strncat first encounters a null terminator in str_2.
If maxchar is 0, no characters are copied from str_
2.
Description
A null character is always appended to the result of the
strncat function. If strncat reaches the specified maximum, it sets
the next byte in str_1 to the null character.
Return Value
x | The address of the first argument,
str_1, which is assumed to be large enough to hold the
concatenated result. |
Previous Page | Next Page | Table of Contents | Index