diff options
author | zeising <zeising@FreeBSD.org> | 2013-02-13 15:46:33 +0000 |
---|---|---|
committer | zeising <zeising@FreeBSD.org> | 2013-02-13 15:46:33 +0000 |
commit | 742b0cd5e431c7658486d03808994218cb67ff73 (patch) | |
tree | 3a292c5a3296a11ce621635ac4655f56153629f7 /include | |
parent | 5f9d7af0e4c93982da4e8a81a5dc98d58db74544 (diff) | |
download | FreeBSD-src-742b0cd5e431c7658486d03808994218cb67ff73.zip FreeBSD-src-742b0cd5e431c7658486d03808994218cb67ff73.tar.gz |
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
Diffstat (limited to 'include')
-rw-r--r-- | include/string.h | 3 |
1 files changed, 3 insertions, 0 deletions
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); |