Embedded Artistry Framework
Embedded Systems C++ Framework
Macros | Functions
strchrnul.c File Reference
#include "strchrnul.h"
#include <limits.h>
#include <stdint.h>
#include <string.h>
Include dependency graph for strchrnul.c:

Macros

#define ALIGN   (sizeof(size_t))
 
#define ONES   ((size_t)-1 / UCHAR_MAX)
 
#define HIGHS   (ONES * (UCHAR_MAX / 2 + 1))
 
#define HASZERO(x)   ((x)-ONES & ~(x)&HIGHS)
 

Functions

char * __strchrnul (const char *s, int c)
 

Macro Definition Documentation

◆ ALIGN

#define ALIGN   (sizeof(size_t))

◆ HASZERO

#define HASZERO (   x)    ((x)-ONES & ~(x)&HIGHS)

◆ HIGHS

#define HIGHS   (ONES * (UCHAR_MAX / 2 + 1))

◆ ONES

#define ONES   ((size_t)-1 / UCHAR_MAX)

Function Documentation

◆ __strchrnul()

char* __strchrnul ( const char *  s,
int  c 
)

References ALIGN, HASZERO, k, ONES, s, strlen(), and w.

Referenced by strchr(), and strcspn().

Here is the caller graph for this function: