aboutsummaryrefslogtreecommitdiff
path: root/compat/strchrnul.c
diff options
context:
space:
mode:
Diffstat (limited to 'compat/strchrnul.c')
-rw-r--r--compat/strchrnul.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/compat/strchrnul.c b/compat/strchrnul.c
new file mode 100644
index 000000000..51839feb6
--- /dev/null
+++ b/compat/strchrnul.c
@@ -0,0 +1,8 @@
+#include "../git-compat-util.h"
+
+char *gitstrchrnul(const char *s, int c)
+{
+ while (*s && *s != c)
+ s++;
+ return (char *)s;
+}