.\" Copyright (c) 1990, 1991 The Regents of the University of California. .\" All rights reserved. .\" .\" This code is derived from software contributed to Berkeley by .\" Chris Torek. .\" %sccs.include.redist.man% .\" .\" @(#)strchr.3 5.2 (Berkeley) 04/20/91 .\" .Dd .Dt STRCHR 3 .Os .Sh NAME .Nm strchr .Nd locate character in string .Sh SYNOPSIS .Fd #include .Ft char * .Fn strchr "const char *s" "int c" .Sh DESCRIPTION The .Fn strchr function locates the first occurence of .Ar c in the string pointed to by .Ar s . The terminating .Dv NUL character is considered part of the string. If .Fa c is .Ql \e0 , .Fn strchr locates the terminating .Ql \e0 . .Sh RETURN VALUES The function .Fn strchr returns a pointer to the located character, or .Dv NULL if the character does not appear in the string. .Sh SEE ALSO .Xr index 3 , .Xr memchr 3 , .Xr rindex 3 , .Xr strcspn 3 , .Xr strpbrk 3 , .Xr strrchr 3 , .Xr strsep 3 , .Xr strspn 3 , .Xr strstr 3 , .Xr strtok 3 .Sh STANDARDS The .Fn strchr function conforms to .St -ansiC .