Copyright @ 2008 Ananda Gunawardena
char *strcpy(char *dest, const char *src);
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.
char *strncpy(char *dest, const char *src,
size_t n);
The strncpy() function is similar, except
that not more than n bytes
copied. Thus, if there is no null byte
among the first n bytes of src, the result
will not be null-terminated.
Concatenation
char *strcat(char *dest, const char *src);
The strcat() function appends the src
string to the dest string over-writing the
'\0' character at the end of dest, and then
adds a terminating '\0' character. The
strings may not overlap, and the dest
string must have enough space for the
result.
char *strncat(char *dest, const char *src,
size_t n);
The strncat() function is similar, except
that only the first n characters of src are
appended to dest.
Comparison
int memcmp(const void *s1, const void
*s2, size_t n);
The memcmp() function compares the
first n bytes of the memory areas s1 and
s2. 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.
int strcmp(const char *s1, const char
*s2);
The strcmp() function compares the two
strings s1 and s2. 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.
int strncmp(const char *s1, const char
*s2, size_t n);
The strncmp() function is similar, except
it only compares the first (at most) n
characters of s1 and s2.
Searching
char *strchr(const char *s, int c);
The strchr() function returns a pointer
to the first occurrence of the character c
in the string s.