The strcspn() function used for number of characters(including blankspace) that occur between the start of the string and the first occurrence of any character listed in the second string.
Syntax
strcspn(string,second_string,start_position,length)
Example
echo strcspn("Hello dear","d");
Output
6
Copyright ©2022 coderraj.com. All Rights Reserved.