Query: strstr
OS: netbsd
Section: 3
Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar
STRSTR(3) BSD Library Functions Manual STRSTR(3)NAMEstrstr, strcasestr -- locate a substring in a stringLIBRARYStandard C Library (libc, -lc)SYNOPSIS#include <string.h> char * strstr(const char *big, const char *little); char * strcasestr(const char *big, const char *little);DESCRIPTIONThe strstr() function locates the first occurrence of the nul-terminated string little in the nul-terminated string big. The strcasestr() function is similar to strstr(), but ignores the case of both strings.RETURN VALUESIf little is an empty string, big is returned; if little occurs nowhere in big, NULL is returned; otherwise a pointer to the first character of the first occurrence of little is returned.EXAMPLESThe following sets the pointer ptr to the "Bar Baz" portion of largestring: const char *largestring = "Foo Bar Baz"; const char *smallstring = "Bar"; char *ptr; ptr = strstr(largestring, smallstring);SEE ALSOindex(3), memchr(3), rindex(3), strchr(3), strcspn(3), strpbrk(3), strrchr(3), strsep(3), strspn(3), strtok(3)STANDARDSThe strstr() function conforms to ISO/IEC 9899:1990 (``ISO C90'').BSDJuly 3, 2004 BSD
Related Man Pages |
---|
strcasestr_l(3) - freebsd |
strcasestr(3) - mojave |
strstr(3) - freebsd |
strcasestr_l(3) - osx |
strnstr(3) - freebsd |
Similar Topics in the Unix Linux Community |
---|
problem editing big file in vi |
How to spot the next big thing that spots next big things |
Playing with Volume of data |
strstr() in Solaris System |
How to copy only some lines from very big file? |