English
Language : 

CC78K4 Datasheet, PDF (219/523 Pages) NEC – CC78K4 Ver.2.30 or Later, C Compiler Language
CHAPTER 10 LIBRARY FUNCTIONS
6-3 strcat,
strncat
Character String/Memory Functions
FUNCTION
The string function strcat concatenates one character string to another.
The string function strncat concatenates up to a specified number of characters from one character string to
another.
HEADER
string. h
FUNCTION PROTOTYPE
char *strcat (char *s1, const char *s2);
char *strncat (char *s1, const char *s2, size_t n);
Function
strcat,
strncat
Arguments
s1... Pointer to a string to
which a copy of another string
(s2) is to be concatenated
s2 ... Pointer to a string, copy
of which is to be concatenated
to another string (s1).
n ... Number of characters to
be concatenated
Return Value
Value of s1
EXPLANATION
strcat
• The strcat function concatenates a copy of the string pointed to by s2 (including the null terminator) to the
string pointed to by s1. The null terminator originally ending s1 is overwritten by the first character of s2.
• When copying is performed between objects overlapping each other, the operation is not guaranteed.
strncat
• The strncat function concatenates not more than the characters specified by n of the string pointed to by s2
(excluding the null terminator) to the string pointed to by s1. The null terminator originally ending s1 is
overwritten by the first character of s2.
• s1 must always be terminated with a null.
• When copying is performed between objects overlapping each other, the operation is not guaranteed.
User’s Manual U15556EJ1V0UM
219