| 1 |
/* @brief Here follows a simple implementation of the GNU function `strchrnul`. |
| 2 |
* Please check the gnulib manual for details. |
| 3 |
*/ |
| 4 |
#include <string.h> |
| 5 |
|
| 6 |
char *strchrnul(const char *s, int c){ |
| 7 |
char *p = strchr(s,c); |
| 8 |
|
| 9 |
return p != NULL ? p : strchr(s, '\0'); |
| 10 |
} |