blob: 2eba3f1574c1437b51eae5adf6d50b707c5b09f4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
/*
* Copyright (C) 1991, 1992 Linus Torvalds
*/
#include <xen/string.h>
/**
* strchr - Find the first occurrence of a character in a string
* @s: The string to be searched
* @c: The character to search for
*/
char *(strchr)(const char *s, int c)
{
for(; *s != (char) c; ++s)
if (*s == '\0')
return NULL;
return (char *) s;
}
/*
* Local variables:
* mode: C
* c-file-style: "BSD"
* c-basic-offset: 8
* tab-width: 8
* indent-tabs-mode: t
* End:
*/
|