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 5*50321Sbostic.\" Chris Torek and the American National Standards Committee X3, 6*50321Sbostic.\" on Information Processing Systems. 7*50321Sbostic.\" 841968Sbostic.\" %sccs.include.redist.man% 941968Sbostic.\" 10*50321Sbostic.\" @(#)strchr.3 5.4 (Berkeley) 06/29/91 1141968Sbostic.\" 1248373Scael.Dd 1348373Scael.Dt STRCHR 3 1448373Scael.Os 1548373Scael.Sh NAME 1648373Scael.Nm strchr 1748373Scael.Nd locate character in string 1848373Scael.Sh SYNOPSIS 1948373Scael.Fd #include <string.h> 2048373Scael.Ft char * 2148373Scael.Fn strchr "const char *s" "int c" 2248373Scael.Sh DESCRIPTION 2348373ScaelThe 2448373Scael.Fn strchr 2548373Scaelfunction locates the first occurence of 2648373Scael.Ar c 2748373Scaelin the string pointed to by 2848373Scael.Ar s . 2948373ScaelThe terminating 3049906Ssellgren.Dv NULL 3148373Scaelcharacter is considered part of the string. 3241968SbosticIf 3348373Scael.Fa c 3448373Scaelis 3548373Scael.Ql \e0 , 3648373Scael.Fn strchr 3748373Scaellocates the terminating 3848373Scael.Ql \e0 . 3948373Scael.Sh RETURN VALUES 4048373ScaelThe function 4148373Scael.Fn strchr 4248373Scaelreturns a pointer to the located character, or 4348373Scael.Dv NULL 4448373Scaelif the character does not appear in the string. 4548373Scael.Sh SEE ALSO 4648373Scael.Xr index 3 , 4748373Scael.Xr memchr 3 , 4848373Scael.Xr rindex 3 , 4948373Scael.Xr strcspn 3 , 5048373Scael.Xr strpbrk 3 , 5148373Scael.Xr strrchr 3 , 5248373Scael.Xr strsep 3 , 5348373Scael.Xr strspn 3 , 5448373Scael.Xr strstr 3 , 5548373Scael.Xr strtok 3 5648373Scael.Sh STANDARDS 5748373ScaelThe 5848373Scael.Fn strchr 5948373Scaelfunction 6048373Scaelconforms to 6148373Scael.St -ansiC . 62