11.6. Miscellaneous Functions

11.6.1. The memset function

Synopsis
#include <string.h>

void *memset (void * s , int c , size_t n );

Description

The memset function copies the value of c (converted to an unsigned char) into each of the first n characters of the object pointed to by s.

Returns

The memset function returns the value of s.

Implementation Notes

None.

11.6.2. The strerror function

Synopsis
#include <string.h>

char *strerror (int errnum );

Description

The strerror function maps the error number in errnum to an error message string.

The implementation shall behave as if no library function calls the strerror function.

Returns

The strerror function returns a pointer to the string, the contents of which are implementation defined.

Implementation Notes

None.

11.6.3. The strlen function

Synopsis
#include <string.h>

size_t strlen (char * s );

Description

The strlen function computes the length of the string pointed to by s.

Returns

The strlen function returns the number of characters that precede the terminating null character.