strstr

Syntax

char* strstr(const char* haystack, const char* needle)

Arguments

haystack
The string to scan.
needle
The string to scan the haystack for.

Return

Pointer to the first match.

Description

Scans the string haystack for the first occurrence of the entire substring needle.
If found, a pointer to the first occurrence is returned; if not found, a NULL is returned instead.

Also see

strcspn, strpbrk, strspn