.\" 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 .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)