Last Updated:
The strpbrk()
function searches the first occurrence of the character in a given string and then it displays the string starting from that character.
This function is defined in <cstring> header file.
Value | Type | Explanation |
---|---|---|
str1 | Required | Specifies an actual string |
str2 | Required | Specifies a string of characters to be searched in str1. |
Value | Explanation |
---|---|
Address | Returns the pointer position to the first occurrence of the character (str2) in the string (str1). |
NULL | If no occurrence of the character (str2) in the string (str1). |