headers/bsd: Add sys/queue.h.
[haiku.git] / src / system / libroot / posix / string / strchr.c
blob15928869807100b4aa20726b576b59af0c69fc69
1 /*
2 * Copyright 2001, Travis Geiselbrecht. All rights reserved.
3 * Distributed under the terms of the NewOS License.
4 */
7 #include <string.h>
8 #include <strings.h>
9 #include <sys/types.h>
12 char*
13 strchr(const char* s, int c)
15 for (; *s != (char)c; ++s)
16 if (*s == '\0')
17 return NULL;
18 return (char*)s;
22 char*
23 index(const char* s, int c)
25 return strchr(s, c);