Strcpy function, Strcspn function – Zilog Z80380 User Manual
Page 80

Library Functions
Run Time Environment
4–16
UM004001-COR1103
strcpy
FUNCTION
Header file statement:
#include
Syntax:
char *strcpy
(char *string1, const char *string2);
The strcpy function copies string2, including the terminating null character, to the location
specified by string1, and returns string1.
The strcpy function operates on null-terminated strings. The string arguments to this function
are expected to contain a null character (‘\0’) marking the end of the string. No overflow
checking is performed when strings are copied or appended.
Return Value
The return values for this function are described above.
strcspn
FUNCTION
Header file statement:
#include
Syntax:
size_t strcspn
(const char *string1, const char *string2);
The strcspn functions return the index of the first character in string1 belonging to the set of
characters specified by string2. This value is equivalent to the length of the initial substring
of string1 consisting entirely of characters not in string2. Terminating null characters are not
considered in the search. If string1 begins with a character from string2, strcspn returns 0.
The strcspn function operates on null-terminated strings. The string arguments to these func-
tions are expected to contain a null character (‘\0’) marking the end of the string.
Return Value
The return values for this function are described above.
Parameter
Description
string1
Destination string
string2
Source string
Parameter
Description
string1
Source string
string2
Character set