repo.or.cz
/
haiku.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
headers/bsd: Add sys/queue.h.
[haiku.git]
/
src
/
system
/
libroot
/
posix
/
string
/
strchr.c
blob
15928869807100b4aa20726b576b59af0c69fc69
1
/*
2
* Copyright 2001, Travis Geiselbrecht. All rights reserved.
3
* Distributed under the terms of the NewOS License.
4
*/
5
6
7
#include <string.h>
8
#include <strings.h>
9
#include <sys/types.h>
10
11
12
char
*
13
strchr
(
const char
*
s
,
int
c
)
14
{
15
for
(; *
s
!= (
char
)
c
; ++
s
)
16
if
(*
s
==
'\0'
)
17
return
NULL
;
18
return
(
char
*)
s
;
19
}
20
21
22
char
*
23
index
(
const char
*
s
,
int
c
)
24
{
25
return
strchr
(
s
,
c
);
26
}