显示下拉菜单

strspn()

« strrpos | strstr »
<?php
$int 
strspn (
    
// string $subject
    
// string $mask
    
// [int $start]
    
  // [int $length]
);
?>
结果
$int = 2
示例
#1 strspn  ("42 is the answer to the 128th question.",
 
"1234567890")
#2 strspn  ("foo",
 
"o")
#3 strspn  ("foo",
 
"o",
 
1,
 
2)
#4 strspn  ("foo",
 
"o",
 
1,
 
1)
另请参阅
strcspn