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:
parent
6e5e43433e
commit
64aebcff0e
@ -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
|
||||
|
19
src/kernel/libroot/posix/string/strchrnul.c
Normal file
19
src/kernel/libroot/posix/string/strchrnul.c
Normal 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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user