|
Embedded Artistry Framework
Embedded Systems C++ Framework
|

Macros | |
| #define | SS (sizeof(size_t)) |
| #define | ALIGN (sizeof(size_t) - 1) |
| #define | ONES ((size_t)-1 / UCHAR_MAX) |
| #define | HIGHS (ONES * (UCHAR_MAX / 2 + 1)) |
| #define | HASZERO(x) ((x)-ONES & ~(x)&HIGHS) |
Functions | |
| void * | memchr (const void *src, int c, size_t n) |
| Finds the first occurrence of c in the initial n characters of the object pointed to by s. More... | |
| #define ALIGN (sizeof(size_t) - 1) |
| #define SS (sizeof(size_t)) |
| void* memchr | ( | const void * | s, |
| int | c, | ||
| size_t | n | ||
| ) |
Finds the first occurrence of c in the initial n characters of the object pointed to by s.
Finds the first occurrence of c (after conversion to unsigned char as if by (unsigned char)c ) in the initial n characters (each interpreted as unsigned char) of the object pointed to by s.
The behavior is undefined if access occurs beyond the end of the array (s) searched. The behavior is undefined if s is a null pointer.
| s | pointer to the object to be examined |
| c | character to search for |
| n | max number of characters to examine |
References __attribute__, ALIGN, HASZERO, k, n, ONES, s, SS, and w.
Referenced by memmem().

1.8.15