Added glibc's proprietary strchrnul() function.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3149 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler 2003-05-03 14:50:10 +00:00
parent 6e5e43433e
commit 64aebcff0e
2 changed files with 20 additions and 0 deletions

View File

@ -10,6 +10,7 @@ KernelMergeObject posix_string.o :
<$(SOURCE_GRIST)>strcasestr.c
<$(SOURCE_GRIST)>strcat.c
<$(SOURCE_GRIST)>strchr.c
<$(SOURCE_GRIST)>strchrnul.c
<$(SOURCE_GRIST)>strcmp.c
<$(SOURCE_GRIST)>strcpy.c
<$(SOURCE_GRIST)>strcspn.c

View File

@ -0,0 +1,19 @@
/*
** Copyright 2003, Axel Dörfler, axeld@pinc-software.de. All rights reserved.
** Distributed under the terms of the OpenBeOS License.
*/
#include <sys/types.h>
#include <string.h>
char *
strchrnul(const char *string, int c)
{
while (string[0] != (char)c && string[0])
string++;
return (char *)string;
}