148350Scael.\" Copyright (c) 1990, 1991 The Regents of the University of California. 241983Sbostic.\" All rights reserved. 341983Sbostic.\" 441983Sbostic.\" This code is derived from software contributed to Berkeley by 5*50327Sbostic.\" Chris Torek and the American National Standards Committee X3, 6*50327Sbostic.\" on Information Processing Systems. 7*50327Sbostic.\" 841983Sbostic.\" %sccs.include.redist.man% 941983Sbostic.\" 10*50327Sbostic.\" @(#)strstr.3 5.3 (Berkeley) 06/29/91 1141983Sbostic.\" 1248350Scael.Dd 1348350Scael.Dt STRSTR 3 1448350Scael.Os 1548350Scael.Sh NAME 1648350Scael.Nm strstr 1748350Scael.Nd locate a substring in a string 1848350Scael.Sh SYNOPSIS 1948350Scael.Fd #include <string.h> 2048350Scael.Ft char * 2148350Scael.Fn strstr "const char *big" "const char *little" 2248350Scael.Sh DESCRIPTION 2348350ScaelThe 2448350Scael.Fn strstr 2548350Scaelfunction 2641983Sbosticlocates the first occurrence of the null-terminated string 2748350Scael.Fa little 2841983Sbosticin the null-terminated string 2948350Scael.Fa big . 3041983SbosticIf 3148350Scael.Fa little 3241983Sbosticis the empty string, 3348350Scael.Fn strstr 3441983Sbosticreturns 3548350Scael.Fa big ; 3641983Sbosticif 3748350Scael.Fa little 3841983Sbosticoccurs nowhere in 3948350Scael.Fa big , 4048350Scael.Fn strstr 4141983Sbosticreturns NULL; 4241983Sbosticotherwise 4348350Scael.Fn strstr 4441983Sbosticreturns a pointer to the first character of the first occurrence of 4548350Scael.Fa little . 4648350Scael.Sh SEE ALSO 4748350Scael.Xr index 3 , 4848350Scael.Xr memchr 3 , 4948350Scael.Xr rindex 3 , 5048350Scael.Xr strchr 3 , 5148350Scael.Xr strcspn 3 , 5248350Scael.Xr strpbrk 3 , 5348350Scael.Xr strrchr 3 , 5448350Scael.Xr strsep 3 , 5548350Scael.Xr strspn 3 , 5648350Scael.Xr strtok 3 5748350Scael.Sh STANDARDS 5848350ScaelThe 5948350Scael.Fn strstr 6048350Scaelfunction 6148350Scaelconforms to 6248350Scael.St -ansiC . 63