Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

strpbrk - get first occurrence of character in string

&pagelevel(4)&pagelevel

Syntax

#include <string.h>

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

Description

strpbrk() searches string s1 for the first character matching any character in string s2 and
returns a pointer to the located position in s1 if successful. The terminating null byte (\0) is
not considered part of string s2.

Return val.

Pointer to the first matching character found in s1


if successful.

Null pointer

if not a single match is present.

Notes

Strings terminated with the null byte (\0) are expected as arguments. 

See also

strchr(), strrchr(), string.h.