PHP function strcspn()
Availability in PHP 4.0
Find length of initial segment not matching mask
Parameters
| Parameter | Data type | Default value | Note |
|---|---|---|---|
$str1 |
string |
not | The first string. |
$str2 |
string |
not | The second string. |
$start |
int |
null, | The start position of the string to examine. |
$length |
int |
null | The length of the string to examine. |
Return values
int
the length of the segment as an integer.