From 742b0cd5e431c7658486d03808994218cb67ff73 Mon Sep 17 00:00:00 2001 From: zeising Date: Wed, 13 Feb 2013 15:46:33 +0000 Subject: Add strchrnul(), a GNU function similar to strchr(), except that it returns a pointer to the end of the string, rather than NULL, if the character was not found. Approved by: theraven --- include/string.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include') diff --git a/include/string.h b/include/string.h index e6a910b..dc18a75 100644 --- a/include/string.h +++ b/include/string.h @@ -74,6 +74,9 @@ char *strcasestr(const char *, const char *) __pure; #endif char *strcat(char * __restrict, const char * __restrict); char *strchr(const char *, int) __pure; +#if defined(_GNU_SOURCE) +char *strchrnul(const char*, int) __pure; +#endif int strcmp(const char *, const char *) __pure; int strcoll(const char *, const char *); char *strcpy(char * __restrict, const char * __restrict); -- cgit v1.1