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
29
30
31
32
|
.\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk)
.\" May be distributed under the GNU General Public License
.\" References consulted:
.\" Linux libc source code
.\" Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991)
.\" 386BSD man pages
.\" Modified Mon Apr 12 12:51:24 1993, David Metcalfe
.TH STRCHR 3 "April 12, 1993" "" "Linux Programmer's Manual"
.SH NAME
strchr, strrchr \- locate character in string
.SH SYNOPSIS
.nf
.B #include <string.h>
.sp
.BI "char *strchr(const char *" s ", int " c );
.sp
.BI "char *strrchr(const char *" s ", int " c );
.fi
.SH DESCRIPTION
The \fBstrchr()\fP function returns a pointer to the first occurrence
of the character \fIc\fP in the string \fIs\fP.
.PP
The \fBstrrchr()\fP function returns a pointer to the last occurrence
of the character \fIc\fP in the string \fIs\fP.
.SH "RETURN VALUE"
The \fBstrchr()\fP and \fBstrrchr()\fP functions return a pointer to
the matched character or NULL if the character is not found.
.SH "CONFORMING TO"
SVID 3, POSIX, BSD 4.3, ISO 9899
.SH SEE ALSO
.BR index "(3), " memchr "(3), " rindex "(3), " strpbrk (3),
.BR strsep "(3), " strspn "(3), " strstr "(3), " strtok (3)
|