


Synopsys:
     #include <string.h>
     int bcmp(const void *S1, const void *S2, size_t N);
   
Description:
'bcmp' compares not more than N bytes of the object pointed to
by S1 with the object pointed to by S2.

   This function is identical to memcmp.
Returns:
The function returns an integer greater than, equal to or less than
zero 	according to whether the object pointed to by S1 is greater than,
equal to or less than the object pointed to by S2.

Portability:
bcmp requires no supporting OS subroutines.

 





Synopsys:
     #include <string.h>
     void bcopy(const void *IN, void *OUT, size_t N);
   
Description:
'bcopy' function copies N bytes from the memory region pointed to by IN to
the memory region pointed to by OUT.

   This function is implemented in term of memmove.

Portability:
bcopy requires no supporting OS subroutines.

 





Synopsys:
     #include <string.h>
     void bzero(void *B, size_t LENGTH);
   
Description:
'bzero' initializes LENGTH bytes of memory, starting at address B, to
zero.

Returns:
bzero does not return a result.

Portability:
bzero is in the Berkeley Software Distribution.  Neither ANSI C nor
the System V Interface Definition (Issue 2) require bzero.

   bzero requires no supporting OS subroutines.

 





Synopsys:
     #include <string.h>
     char * index(const char *STRING, int C);
   
Description:
'index' function finds the first occurence of C (converted to a char) in
the string pointed to by STRING (including the terminating null
character).

   This function is identical to strchr.

Returns:
Returns a pointer to the located character, or a null pointer if C does
not occur in STRING.

Portability:
index requires no supporting OS subroutines.

 





Synopsys:
     #include <string.h>
     void* memccpy(void *OUT, const void *IN,
         int ENDCHAR, size_t N);
   
Description:
'memccpy' function copies up to N bytes from the memory region pointed to by
IN to the memory region pointed to by OUT.  If a byte matching the
ENDCHAR is encountered, the byte is copied and copying stops.

   If the regions overlap, the behavior is undefined.

Returns:
memccpy returns a pointer to the first byte following the ENDCHAR in
the OUT region.  If no byte matching ENDCHAR was copied, then NULL is
returned.

Portability:
memccpy is a GNU extension.

   memccpy requires no supporting OS subroutines.

 





Synopsys:
     #include <string.h>
     void *memchr(const void *SRC, int C, size_t LENGTH);
   
Description:
'memchr' function searches memory starting at *SRC for the character C.
The search only ends with the first occurrence of C, or after LENGTH
characters; in particular, NULL does not terminate the search.

Returns:
If the character C is found within LENGTH characters of *SRC, a
pointer to the character is returned. If C is not found, then NULL is
returned.

Portability:
memchr> is ANSI C.

   memchr  requires no supporting OS subroutines.

 





Synopsys:
     #include <string.h>
     int memcmp(const void *S1, const void *S2, size_t N);
   
Description:
'memcmp' compares not more than N characters of the object pointed
to by S1 with the object pointed to by S2.

Returns:
The function returns an integer greater than, equal to or less than
zero 	according to whether the object pointed to by S1 is greater than,
equal to or less than the object pointed to by S2.

Portability:
memcmp is ANSI C.

   memcmp requires no supporting OS subroutines.

 





Synopsys:
     #include <string.h>
     void* memcpy(void *OUT, const void *IN, size_t N);
   
Description:
'memcpy' function copies N bytes from the memory region pointed to by IN to
the memory region pointed to by OUT.

   If the regions overlap, the behavior is undefined.

Returns:
memcpy returns a pointer to the first byte of the OUT region.

Portability:
memcpy is ANSI C.

   memcpy requires no supporting OS subroutines.

 





Synopsys:
     #include <string.h>
     void *memmove(void *DST, const void *SRC, size_t LENGTH);
   
Description:
'memmove' function moves LENGTH characters from the block of memory starting
at *SRC to the memory starting at *DST. memmove reproduces the
characters correctly at *DST even if the two areas overlap.

Returns:
The function returns DST as passed.

Portability:
memmove is ANSI C.

   memmove requires no supporting OS subroutines.

 





Synopsys:
     #include <string.h>
     void* mempcpy(void *OUT, const void *IN, size_t N);
   
Description:
'mempcpy' function copies N bytes from the memory region pointed to by IN to
the memory region pointed to by OUT.

   If the regions overlap, the behavior is undefined.

Returns:
mempcpy returns a pointer to the byte following the last byte copied
to the OUT region.

Portability:
mempcpy is a GNU extension.

   mempcpy requires no supporting OS subroutines.

 





Synopsys:
     #include <string.h>
     void *memset(const void *DST, int C, size_t LENGTH);
   
Description:
'memset' function converts the argument C into an unsigned char and fills
the first LENGTH characters of the array pointed to by DST to the value.

Returns:
memset returns the value of M.

Portability:
memset is ANSI C.

   memset requires no supporting OS subroutines.

 





Synopsys:
     #include <string.h>
     char * rindex(const char *STRING, int C);
   
Description:
'rindex' function finds the last occurence of C (converted to a char) in
the string pointed to by STRING (including the terminating null
character).

   This function is identical to strrchr.

Returns:
Returns a pointer to the located character, or a null pointer if C does
not occur in STRING.

Portability:
rindex requires no supporting OS subroutines.

 





Synopsys:
     #include <string.h>
     int strcasecmp(const char *A, const char *B);
   
Description:
'strcasecmp' compares the string at A to the string at B in a
case-insensitive manner.

Returns:
If *A sorts lexicographically after *B (after both are converted to
upper case), strcasecmp returns a number greater than zero.  If the
two strings match, strcasecmp returns zero.  If *A sorts
lexicographically before *B, strcasecmp returns a number less than
zero.

Portability:
strcasecmp is in the Berkeley Software Distribution.

   strcasecmp requires no supporting OS subroutines. It uses
tolower() from elsewhere in this library.

 





Synopsys:
     #include <string.h>
     char *strcat(char *DST, const char *SRC);
   
Description:
'strcat' appends a copy of the string pointed to by SRC (including the
terminating null character) to the end of the string pointed to by DST.
The initial character of SRC overwrites the null character at the end
of DST.

Returns:
This function returns the initial value of DST

Portability:
strcat is ANSI C.

   strcat requires no supporting OS subroutines.

 





Synopsys:
     #include <string.h>
     char * strchr(const char *STRING, int C);
   
Description:
'strchr' function finds the first occurence of C (converted to a char) in
the string pointed to by STRING (including the terminating null
character).

Returns:
Returns a pointer to the located character, or a null pointer if C does
not occur in STRING.

Portability:
strchr is ANSI C.

   strchr requires no supporting OS subroutines.

 





Synopsys:
     #include <string.h>
     int strcmp(const char *A, const char *B);
   
Description:
'strcmp' compares the string at A to the string at B.

Returns:
If *A sorts lexicographically after *B, strcmp returns a number
greater than zero.  If the two strings match, strcmp returns zero.
If *A sorts lexicographically before *B, strcmp returns a number
less than zero.

Portability:
strcmp is ANSI C.

   strcmp requires no supporting OS subroutines.

 





Synopsys:
     #include <string.h>
     int strcoll(const char *STRA, const char * STRB);
   
Description:
'strcoll' compares the string pointed to by STRA to the string pointed
to by STRB, using an interpretation appropriate to the current
'LC_COLLATE' state.

Returns:
If the first string is greater than the second string, strcoll
returns a number greater than zero.  If the two strings are equivalent,
strcoll returns zero.  If the first string is less than the second
string, strcoll returns a number less than zero.

Portability:
strcoll is ANSI C.

   strcoll requires no supporting OS subroutines.

 





Synopsys:
     #include <string.h>
     char *strcpy(char *DST, const char *SRC);
   
Description:
'strcpy' copies the string pointed to by SRC (including the terminating
null character) to the array pointed to by DST.

Returns:
This function returns the initial value of DST.

Portability:
strcpy is ANSI C.

   strcpy requires no supporting OS subroutines.

 





Synopsys:
     size_t strcspn(const char *S1, const char *S2);
   
Description:
'strcspn' function computes the length of the initial part of the string
pointed to by S1 which consists entirely of characters NOT from the
string pointed to by S2 (excluding the terminating null character).

Returns:
strcspn returns the length of the substring found.

Portability:
strcspn is ANSI C.

   strcspn requires no supporting OS subroutines.

 





Synopsys:
     #include <string.h>
     char *strerror(int ERRNUM);
   
Description:
'strerror' converts the error number ERRNUM into a string.  The value
of ERRNUM is usually a copy of 'errno'.  If 'errnum' is not a known
error number, the result points to an empty string.

   This implementation of strerror prints out the following strings
for each of the values defined in errno.h:

'E2BIG'
     Arg list too long

'EACCES'
     Permission denied

'EADDRINUSE'
     Address already in use

'EADV'
     Advertise error

'EAFNOSUPPORT'
     Address family not supported by protocol family

'EAGAIN'
     No more processes

'EALREADY'
     Socket already connected

'EBADF'
     Bad file number

'EBADMSG'
     Bad message

'EBUSY'
     Device or resource busy

'ECHILD'
     No children

'ECOMM'
     Communication error

'ECONNABORTED'
     Software caused connection abort

'ECONNREFUSED'
     Connection refused

'EDEADLK'
     Deadlock

'EDESTADDRREQ'
     Destination address required

'EEXIST'
     File exists

'EDOM'
     Math argument

'EFAULT'
     Bad address

'EFBIG'
     File too large

'EHOSTDOWN'
     Host is down

'EHOSTUNREACH'
     Host is unreachable

'EIDRM'
     Identifier removed

'EINPROGRESS'
     Connection already in progress

'EINTR'
     Interrupted system call

'EINVAL'
     Invalid argument

'EIO'
     I/O error

'EISCONN'
     Socket is already connected

'EISDIR'
     Is a directory

'ELIBACC'
     Cannot access a needed shared library

'ELIBBAD'
     Accessing a corrupted shared library

'ELIBEXEC'
     Cannot exec a shared library directly

'ELIBMAX'
     Attempting to link in more shared libraries than system limit

'ELIBSCN'
     .lib section in a.out corrupted

'EMFILE'
     Too many open files

'EMLINK'
     Too many links

'EMSGSIZE'
     Message too long

'EMULTIHOP'
     Multihop attempted

'ENAMETOOLONG'
     File or path name too long

'ENETDOWN'
     Network interface not configured

'ENETUNREACH'
     Network is unreachable

'ENFILE'
     Too many open files in system

'ENODEV'
     No such device

'ENOENT'
     No such file or directory

'ENOEXEC'
     Exec format error

'ENOLCK'
     No lock

'ENOLINK'
     Virtual circuit is gone

'ENOMEM'
     Not enough space

'ENOMSG'
     No message of desired type

'ENONET'
     Machine is not on the network

'ENOPKG'
     No package

'ENOPROTOOPT'
     Protocol not available

'ENOSPC'
     No space left on device

'ENOSR'
     No stream resources

'ENOSTR'
     Not a stream

'ENOSYS'
     Function not implemented

'ENOTBLK'
     Block device required

'ENOTCONN'
     Socket is not connected

'ENOTDIR'
     Not a directory

'ENOTEMPTY'
     Directory not empty

'ENOTSOCK'
     Socket operation on non-socket

'ENOTSUP'
     Not supported

'ENOTTY'
     Not a character device

'ENXIO'
     No such device or address

'EPERM'
     Not owner

'EPIPE'
     Broken pipe

'EPROTO'
     Protocol error

'EPROTOTYPE'
     Protocol wrong type for socket

'EPROTONOSUPPORT'
     Unknown protocol

'ERANGE'
     Result too large

'EREMOTE'
     Resource is remote

'EROFS'
     Read-only file system

'ESHUTDOWN'
     Can't send after socket shutdown

'ESOCKTNOSUPPORT'
     Socket type not supported

'ESPIPE'
     Illegal seek

'ESRCH'
     No such process

'ESRMNT'
     Srmount error

'ETIME'
     Stream ioctl timeout

'ETIMEDOUT'
     Connection timed out

'ETXTBSY'
     Text file busy

'EXDEV'
     Cross-device link


Returns:
This function returns a pointer to a string.  Your application must not
modify that string.

Portability:
ANSI C requires strerror, but does not specify the strings used for
each error number.

   Although this implementation of strerror is reentrant, ANSI C
declares that subsequent calls to strerror may overwrite the result
string; therefore portable code cannot depend on the reentrancy of this
subroutine.

   This implementation of strerror provides for user-defined
extensibility.  errno.h defines __ELASTERROR, which can be used as a
base for user-defined error values.  If the user supplies a routine
named _user_strerror, and ERRNUM passed to strerror does not match
any of the supported values, _user_strerror is called with ERRNUM as
its argument.

   '_user_strerror' takes one argument of type INT, and returns a
character pointer.  If ERRNUM is unknown to _user_strerror,
_user_strerror returns NULL.  The default _user_strerror returns
NULL for all input values.

   strerror requires no supporting OS subroutines.

 





Synopsys:
     #include <string.h>
     char *strerror_r(int ERRNUM, char *BUFFER, size_t N);
   
Description:
'strerror_r' converts the error number ERRNUM into a string and copies
the result into the supplied BUFFER for a length up to N, including the
NUL terminator. The value of ERRNUM is usually a copy of errno.  If
errnum is not a known error number, the result is the empty string.

   See strerror for how strings are mapped to errnum.

Returns:
This function returns a pointer to a string.  Your application must not
modify that string.

Portability:
strerror_r is a gnu extension.

   strerror_r requires no supporting OS subroutines.

 





Synopsys:
     #include <string.h>
     size_t strlen(const char *STR);
   
Description:
The 'strlen' function works out the length of the string starting at
*STR by counting chararacters until it reaches a NULL character.

Returns:
strlen returns the character count.

Portability:
strlen is ANSI C.

   strlen requires no supporting OS subroutines.

 





Synopsys:
     #include <string.h>
     char *strlwr(char *A);
   
Description:
'strlwr' converts each characters in the string at A to lower case.

Returns:
strlwr returns its argument, A.

Portability:
strlwr is not widely portable.

   strlwr requires no supporting OS subroutines.

 





Synopsys:
     #include <string.h>
     int strncasecmp(const char *A, const char * B, size_t LENGTH);
   
Description:
'strncasecmp' compares up to LENGTH characters from the string at A to
the string at B in a case-insensitive manner.

Returns:
If *A sorts lexicographically after *B (after both are converted to
upper case), strncasecmp returns a number greater than zero.  If the
two strings are equivalent, strncasecmp returns zero.  If *A sorts
lexicographically before *B, strncasecmp returns a number less than
zero.

Portability:
strncasecmp is in the Berkeley Software Distribution.

   strncasecmp requires no supporting OS subroutines. It uses
tolower() from elsewhere in this library.

 





Synopsys:
     #include <string.h>
     char *strncat(char *DST, const char *SRC, size_t LENGTH);
   
Description:
'strncat' appends not more than LENGTH characters from the string
pointed to by SRC (including the	terminating null character) to the end
of the string pointed to by DST.  The initial character of SRC
overwrites the null character at the end of DST.  A terminating null
character is always appended to the result

*Warnings*
Note that a null is always appended, so that if the copy is limited by
the LENGTH argument, the number of characters appended to DST is n +
1.
Returns:
This function returns the initial value of DST

Portability:
strncat is ANSI C.

   strncat requires no supporting OS subroutines.

 





Synopsys:
     #include <string.h>
     int strncmp(const char *A, const char * B, size_t LENGTH);
   
Description:
'strncmp' compares up to LENGTH characters from the string at A to the
string at B.

Returns:
If *A sorts lexicographically after *B, strncmp returns a number
greater than zero.  If the two strings are equivalent, strncmp
returns zero.  If *A sorts lexicographically before *B, strncmp
returns a number less than zero.

Portability:
strncmp is ANSI C.

   strncmp requires no supporting OS subroutines.

 





Synopsys:
     #include <string.h>
     char *strncpy(char *DST, const char *SRC, size_t LENGTH);
   
Description:
'strncpy' copies not more than LENGTH characters from the the string
pointed to by SRC (including the terminating null character) to the
array pointed to by DST.  If the string pointed to by SRC is shorter
than LENGTH characters, null characters are appended to the destination
array until a total of LENGTH characters have been written.

Returns:
This function returns the initial value of DST.

Portability:
strncpy is ANSI C.

   strncpy requires no supporting OS subroutines.

 





Synopsys:
     #include <string.h>
     size_t strnlen(const char *STR, size_t N);
   
Description:
The 'strnlen' function works out the length of the string starting at
*STR by counting chararacters until it reaches a NUL character or the
maximum: N number of characters have been inspected.

Returns:
strnlen returns the character count or N.

Portability:
strnlen is a Gnu extension.

   strnlen requires no supporting OS subroutines.

 





Synopsys:
     #include <string.h>
     char *strpbrk(const char *S1, const char *S2);
   
Description:
'strpbrk' function locates the first occurence in the string pointed to by
S1 of any character in string pointed to by S2 (excluding the
terminating null character).

Returns:
strpbrk returns a pointer to the character found in S1, or a null
pointer if no character from S2 occurs in S1.

Portability:
strpbrk requires no supporting OS subroutines.

 





Synopsys:
     #include <string.h>
     char * strrchr(const char *STRING, int C);
   
Description:
'strrchr' function finds the last occurence of C (converted to a char) in
the string pointed to by STRING (including the terminating null
character).

Returns:
Returns a pointer to the located character, or a null pointer if C does
not occur in STRING.

Portability:
strrchr is ANSI C.

   strrchr requires no supporting OS subroutines.

 





Synopsys:
     #include <string.h>
     size_t strspn(const char *S1, const char *S2);
   
Description:
'strspn' function computes the length of the initial segment of the string
pointed to by S1 which consists entirely of characters from the string
pointed to by S2 (excluding the terminating null character).

Returns:
strspn returns the length of the segment found.

Portability:
strspn is ANSI C.

   strspn requires no supporting OS subroutines.

 





Synopsys:
     #include <string.h>
     char *strstr(const char *S1, const char *S2);
   
Description:
'strstr' locates the first occurence in the string pointed to by S1 of the
sequence of characters in the string pointed to by S2 (excluding the
terminating null  character).

Returns:
Returns a pointer to the located string segment, or a null pointer if
the string S2 is not found. If S2 points to a string with zero length,
the S1 is returned.

Portability:
strstr is ANSI C.

   strstr requires no supporting OS subroutines.

 





Synopsys:
     #include <string.h>
     char *strtok(char *SOURCE, const char *DELIMITERS)
     char *strtok_r(char *SOURCE, const char *DELIMITERS,
         char **LASTS)
     char *strsep(char **SOURCE_PTR, const char *DELIMITERS)
   
Description:
The 'strtok' function is used to isolate sequential tokens in a
null-terminated string, *SOURCE. These tokens are delimited in the
string by at least one of the characters in *DELIMITERS.  The first
time that strtok is called, *SOURCE should be specified; subsequent
calls, wishing to obtain further tokens from the same string, should
pass a null pointer instead.  The separator string, *DELIMITERS, must
be supplied each time, and may change between calls.

   The strtok function returns a pointer to the beginning of each
subsequent token in the string, after replacing the separator character
itself with a NUL character.  When no more tokens remain, a null
pointer is returned.

   The 'strtok_r' function has the same behavior as strtok, except a
pointer to placeholder '*[lasts> must be supplied by the caller.

   The 'strsep' function is similar in behavior to strtok, except a
pointer to the string pointer must be supplied [source_ptr> and the
function does not skip leading delimeters.  When the string starts with
a delimeter, the delimeter is changed to the NUL character and the
empty string is returned.  Like strtok_r and strtok, the
*[source_ptr> is updated to the next character following the last
delimeter found or NULL if the end of string is reached with no more
delimeters.

Returns:
strtok, strtok_r, and strsep all return a pointer to the next
token, or NULL if no more tokens can be found.  For strsep, a token
may be the empty string.

Portability:
strtok is ANSI C.  strtok_r is POSIX.  strsep is a BSD-extension.

   strtok, strtok_r, and strsep require no supporting OS
subroutines.

 





Synopsys:
     #include <string.h>
     char *strupr(char *A);
   
Description:
'strupr' converts each characters in the string at A to upper case.

Returns:
strupr returns its argument, A.

Portability:
strupr is not widely portable.

   strupr requires no supporting OS subroutines.

 





Synopsys:
     #include <string.h>
     size_t strxfrm(char *S1, const char *S2, size_t N);
   
Description:
'strxfrm' function transforms the string pointed to by S2 and places the
resulting string into the array pointed to by S1. The transformation is
such that if the strcmp function is applied to the two transformed
strings, it returns a value greater than, equal to, or less than zero,
correspoinding to the result of a strcoll function applied to the
same two original strings.

   No more than N characters are placed into the resulting array
pointed to by S1, including the terminating null character. If N is
zero, S1 may be a null pointer. If copying takes place between objects
that overlap, the behavior is undefined.

   With a C locale, this function just copies.

Returns:
The strxfrm function returns the length of the transformed string
(not including the terminating null character). If the value returned
is N or more, the contents of the array pointed to by S1 are
indeterminate.

Portability:
strxfrm is ANSI C.

   strxfrm requires no supporting OS subroutines.

 





Synopsys:
     #include <unistd.h>
     void swab(const void *IN, void *OUT, ssize_t N);
   
Description:
'swab' function copies N bytes from the memory region pointed to by IN to
the memory region pointed to by OUT, exchanging adjacent even and odd
bytes.

Portability:
swab requires no supporting OS subroutines.

