September 1998
Intermediate to advanced
848 pages
20h 13m
English
The string.h library defines the size_t type and the NULL macro for the null pointer. It provides several functions for analyzing and manipulating character strings and a few that deal with memory more generally. Table F.16 lists the functions.
| Prototype | Description |
|---|---|
| void *memchr(const void *s, int c, size_t n); | Searches for the first occurrence of c (converted to unsigned char) in the initial n characters of the object pointed to by s; returns a pointer to the first occurrence, NULL if none is found. |
| int memcmp(const void *s1, const void *s2, size_t n); | Compares the first n characters of the object pointed to by s1 to the first n characters of the object pointed to by s2, interpreting each ... |
Read now
Unlock full access