7 char *strchr(char const *s, int c);
9 char *strrchr(char const *s, int c);
12 The strchr() function returns a pointer to the first occurrence of the
13 character c in the string s.
15 The strrchr() function returns a pointer to the last occurrence of the
16 character c in the string s.
18 Here "character" means "byte" - these functions do not work with wide
19 or multi-byte characters.
22 The strchr() and strrchr() functions return a pointer to the matched
23 character or NULL if the character is not found.
26 SVID 3, POSIX, BSD 4.3, ISO 9899
30 strchr( char const *s
, int c
)
33 if ((unsigned)*s
== (unsigned)c
)
36 } while (*(++s
) != NUL
);
42 strrchr( char const *s
, int c
)
44 char const *e
= s
+ strlen(s
);
50 if ((unsigned)*e
== (unsigned)c
)
59 * c-file-style: "stroustrup"
60 * indent-tabs-mode: nil
62 * end of compat/strsignal.c */