JString::strcspn
UTF-8 aware alternative to strcspn Find length of initial segment not matching mask
Signature
public function strcspn(string
$str,
[string
$mask = null,
[integer
$start = null,
[integer
$length = null]]] )
Parameters
-
$str
- The string to process
-
$mask
- The mask
-
$start
- Optional starting character position (in characters)
-
$length
- Optional length
Returns
- integer
- The length of the initial segment of str1 which does not contain any of the characters in str2