strpbrk function(Search String for One of a Set of Characters) in C Language – example and detail

In the C Programming Language, the strpbrk feature searches inside the string pointed to by way of s1 for any character in the string pointed to by using s2.

Syntax

The syntax for the strpbrk feature in the C Language is:

char *strpbrk(const char *s1, const char *s2);

Parameters or Arguments

s1 A string to search within. s2 The string that you prefer to find.

Returns

The strpbrk characteristic returns a pointer to the leftmost matching personality in the string pointed to with the aid of s1 that matches any personality in the string pointed to through s2. If no match is found, it returns a null pointer.

Required Header

In the C Language, the required header for the strpbrk feature is:

#include <string.h>

Applies To

In the C Language, the strpbrk characteristic can be used in the following versions:

ANSI/ISO 9899-1990

See Also

Other C functions that are noteworthy when dealing with the strpbrk function:

memchr function strchr feature strrchr feature strstr function