148373Scael.\" Copyright (c) 1990, 1991 The Regents of the University of California. 241968Sbostic.\" All rights reserved. 341968Sbostic.\" 441968Sbostic.\" This code is derived from software contributed to Berkeley by 541968Sbostic.\" Chris Torek. 641968Sbostic.\" %sccs.include.redist.man% 741968Sbostic.\" 8*49906Ssellgren.\" @(#)strchr.3 5.3 (Berkeley) 05/28/91 941968Sbostic.\" 1048373Scael.Dd 1148373Scael.Dt STRCHR 3 1248373Scael.Os 1348373Scael.Sh NAME 1448373Scael.Nm strchr 1548373Scael.Nd locate character in string 1648373Scael.Sh SYNOPSIS 1748373Scael.Fd #include <string.h> 1848373Scael.Ft char * 1948373Scael.Fn strchr "const char *s" "int c" 2048373Scael.Sh DESCRIPTION 2148373ScaelThe 2248373Scael.Fn strchr 2348373Scaelfunction locates the first occurence of 2448373Scael.Ar c 2548373Scaelin the string pointed to by 2648373Scael.Ar s . 2748373ScaelThe terminating 28*49906Ssellgren.Dv NULL 2948373Scaelcharacter is considered part of the string. 3041968SbosticIf 3148373Scael.Fa c 3248373Scaelis 3348373Scael.Ql \e0 , 3448373Scael.Fn strchr 3548373Scaellocates the terminating 3648373Scael.Ql \e0 . 3748373Scael.Sh RETURN VALUES 3848373ScaelThe function 3948373Scael.Fn strchr 4048373Scaelreturns a pointer to the located character, or 4148373Scael.Dv NULL 4248373Scaelif the character does not appear in the string. 4348373Scael.Sh SEE ALSO 4448373Scael.Xr index 3 , 4548373Scael.Xr memchr 3 , 4648373Scael.Xr rindex 3 , 4748373Scael.Xr strcspn 3 , 4848373Scael.Xr strpbrk 3 , 4948373Scael.Xr strrchr 3 , 5048373Scael.Xr strsep 3 , 5148373Scael.Xr strspn 3 , 5248373Scael.Xr strstr 3 , 5348373Scael.Xr strtok 3 5448373Scael.Sh STANDARDS 5548373ScaelThe 5648373Scael.Fn strchr 5748373Scaelfunction 5848373Scaelconforms to 5948373Scael.St -ansiC . 60