Page 1026 BUGS The standard buffered functions do not interact well with certain other library and system functions, especially vfork and abort. This may not be the case under Linux. STANDARDS The stdio library conforms to ANSI C3.159-1989 (ANSI C). LIST OF FUNCTIONS
Page 1027
BSD man page, 29 November 1993 stpcpystpcpyCopies a string returning a pointer to its end SYNOPSIS #include <string.h> char *stpcpy(char *dest, const char *src); DESCRIPTION The stpcpy() function copies the string pointed to by src (including the terminating \0 character) to the array pointed to by dest. The strings may not overlap, and the destination string dest must be large enough to receive the copy. RETURN VALUE stpcpy() returns a pointer to the end of the string dest (that is, the address of the terminating null character) rather than the beginning. EXAMPLE For example, this program uses stpcpy to concatenate foo and bar to produce foobar, which it then prints: #include <string.h> int main (void) { Page 1028 char *to = buffer; to = stpcpy (to, "foo"); to = stpcpy (to, "bar"); printf ("%s\n", buffer); } CONFORMS TO This function is not part of the ANSI or POSIX standards, and is not customary on UNIX systems, but is not a GNU invention either. Perhaps it comes from MS-DOS. SEE ALSO strcpy(3), bcopy(3), memccpy(3), memcpy(3), memmove(3) GNU, 3 September 1995 strcasecmp, strncasecmpstrcasecmp, strncasecmpCompare two strings, ignoring case SYNOPSIS #include <string.h> int strcasecmp(const char *s1, const char *s2); int strncasecmp(const char *s1, const char *s2, size_t n); DESCRIPTION The strcasecmp() function compares the two strings s1 and s2, ignoring the case of the characters. It returns an integer less than, equal to, or greater than zero if s1 is found, respectively, to be less than, to match, or be greater than s2. The strncasecmp() function is similar, except it only compares the first n characters of s1. RETURN VALUE The strcasecmp() and strncasecmp() functions return an integer less than, equal to, or greater than zero if s1 (or the first n bytes thereof) is found, respectively, to be less than, to match, or be greater than s2. CONFORMS TO BSD 4.3 SEE ALSO bcmp(3), memcmp(3), strcmp(3), strcoll(3), strncmp(3) 11 April 1993 strcat, strncatstrcat, strncatConcatenate two strings SYNOPSIS #include <string.h> char *strcat(char *dest, const char *src); char *strncat(char *dest, const char *src, size_t n); |