1.\" Copyright (c) 1990, 1991, 1993 2.\" The Regents of the University of California. All rights reserved. 3.\" 4.\" This code is derived from software contributed to Berkeley by 5.\" Chris Torek and the American National Standards Committee X3, 6.\" on Information Processing Systems. 7.\" 8.\" %sccs.include.redist.man% 9.\" 10.\" @(#)strchr.3 8.2 (Berkeley) 04/19/94 11.\" 12.Dd 13.Dt STRCHR 3 14.Os 15.Sh NAME 16.Nm strchr 17.Nd locate character in string 18.Sh SYNOPSIS 19.Fd #include <string.h> 20.Ft char * 21.Fn strchr "const char *s" "int c" 22.Sh DESCRIPTION 23The 24.Fn strchr 25function locates the first occurrence of 26.Ar c 27in the string pointed to by 28.Ar s . 29The terminating 30.Dv NULL 31character is considered part of the string. 32If 33.Fa c 34is 35.Ql \e0 , 36.Fn strchr 37locates the terminating 38.Ql \e0 . 39.Sh RETURN VALUES 40The function 41.Fn strchr 42returns a pointer to the located character, or 43.Dv NULL 44if the character does not appear in the string. 45.Sh SEE ALSO 46.Xr index 3 , 47.Xr memchr 3 , 48.Xr rindex 3 , 49.Xr strcspn 3 , 50.Xr strpbrk 3 , 51.Xr strrchr 3 , 52.Xr strsep 3 , 53.Xr strspn 3 , 54.Xr strstr 3 , 55.Xr strtok 3 56.Sh STANDARDS 57The 58.Fn strchr 59function 60conforms to 61.St -ansiC . 62