Open System Services Library Calls Reference Manual (G06.29+, H06.08+, J06.03+)
OSS Library Calls (s) strncat(3)
NAME
strncat - Appends bytes to a string
LIBRARY
G-series native Guardian processes: $SYSTEM.SYSnn.ZCRESRL
G-series native OSS processes: /G/system/sysnn/zcresrl
H-series and J-series native Guardian processes: $SYSTEM.ZDLLnnn.ZCREDLL
32-bit H-series and J-series OSS processes: /G/system/zdllnnn/zcredll
64-bit H-series and J-series OSS processes: /G/system/zdllnnn/ycredll
SYNOPSIS
#include <string.h>
char *strncat(
char *s1,
const char *s2,
size_t n);
PARAMETERS
s1 Points to a location containing first string.
s2 Points to a location containing the second of two strings referenced.
n Specifies the maximum number of bytes in a string to append.
DESCRIPTION
The strncat( ) function appends n bytes in the string pointed to by the s2 parameter to the end of
the string pointed to by the s1 parameter. The initial byte of the string pointed to by s2
overwrites the null character at the end of the string pointed to by s1. The strncat( ) function
appends at most the number of bytes specified by the value of the n parameter minus 1. It then
appends a null byte to the result, and returns s1.
NOTES
When operating on overlapping strings, the behavior of this function is unreliable.
RETURN VALUES
Upon successful completion, the strncat( ) function returns a pointer to the resulting string. Oth-
erwise, this function returns a null pointer.
RELATED INFORMATION
Functions: strcat(3), strcmp(3), strcpy(3), strncmp(3), strncpy(3).
527187-017 Hewlett-Packard Company 6−157