Previous | Table of Contents | Next

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

Function description
clearerr Check and reset stream status
fclose Close a stream
fdopen Stream open functions
feof Check and reset stream status
ferror Check and reset stream status
fflush Flush a stream
fgetc Get next character or word from input stream
fgetline Get a line from a stream
fgetpos Reposition a stream
fgets Get a line from a stream
fileno Check and reset stream status
fopen Stream open functions
fprintf Formatted output conversion
fpurge Flush a stream
fputc Output a character or word to a stream
fputs Output a line to a stream
fread Binary stream input/output
freopen Stream open functions
fropen Open a stream
fscanf Input format conversion
fseek Reposition a stream
fsetpos Reposition a stream
ftell Reposition a stream
fwrite Binary stream input/output
getc Get next character or word from input stream
getchar Get next character or word from input stream
gets Get a line from a stream
getw Get next character or word from input stream
mktemp Make temporary filename (unique)
perror System error messages
printf Formatted output conversion
putc Output a character or word to a stream
putchar Output a character or word to a stream
puts Output a line to a stream
putw Output a character or word to a stream

Page 1027

remove Remove directory entry
rewind Reposition a stream
scanf Input format conversion
setbuf Stream buffering operations
setbuffer Stream buffering operations
setlinebuf Stream buffering operations
setvbuf Stream buffering operations
sprintf Formatted output conversion
sscanf Input format conversion
strerror System error messages
sys_errlist System error messages
sys_nerr System error messages
tempnam Temporary file routines
tmpfile Temporary file routines
tmpnam Temporary file routines
ungetc Un-get character from input stream
vfprintf Formatted output conversion
vfscanf Input format conversion
vprintf Formatted output conversion
vscanf Input format conversion
vsprintf Formatted output conversion
vsscanf Input format conversion

BSD man page, 29 November 1993

stpcpy

stpcpy—Copies 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, strncasecmp

strcasecmp, strncasecmp—Compare 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, strncat

strcat, strncat—Concatenate two strings

SYNOPSIS

#include <string.h>
char *strcat(char *dest, const char *src);
char *strncat(char *dest, const char *src, size_t n);

Previous | Table of Contents | Next

1