aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorNiclas Zeising <zeising@FreeBSD.org>2013-02-13 15:46:33 +0000
committerNiclas Zeising <zeising@FreeBSD.org>2013-02-13 15:46:33 +0000
commitd902844bbdee76f0f8e5b50c7d88d66f034f75e7 (patch)
tree3a292c5a3296a11ce621635ac4655f56153629f7 /include
parent626d8465fbf608ec33e89fce543a289fcba3ce1e (diff)
downloadsrc-d902844bbdee76f0f8e5b50c7d88d66f034f75e7.tar.gz
src-d902844bbdee76f0f8e5b50c7d88d66f034f75e7.zip
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
Notes
Notes: svn path=/head/; revision=246766
Diffstat (limited to 'include')
-rw-r--r--include/string.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/string.h b/include/string.h
index e6a910b96fd3..dc18a75161d7 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);