Skip to content

str_str.3

Manvendra Bhangui edited this page May 7, 2023 · 2 revisions

NAME

str_str - locate a substring

SYNOPSIS

#include <str.h>

char *str_str(const char *haystack, const char *needle);

DESCRIPTION

The str_str() function finds the first occurrence of the substring needle in the string haystack. The terminating null bytes ('\0') are not compared.

RETURN VALUE

str_str return a pointer to the beginning of the located substring, or NULL if the substring is not found.

SEE ALSO

index(3) memchr(3) memmem(3) rindex(3) strcasecmp(3) strchr(3) string(3) strpbrk(3) strsep(3) strspn(3) strtok(3) wcsstr(3)

Clone this wiki locally