php man page for strcspn

Query: strcspn

OS: php

Section: 3

Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar

STRCSPN(3)								 1								STRCSPN(3)

strcspn - Find length of initial segment not matching mask

SYNOPSIS
int strcspn (string $str1, string $str2, [int $start], [int $length])
DESCRIPTION
Returns the length of the initial segment of $str1 which does not contain any of the characters in $str2.
PARAMETERS
o $str1 - The first string. o $str2 - The second string. o $start - The start position of the string to examine. o $length - The length of the string to examine.
RETURN VALUES
Returns the length of the segment as an integer.
EXAMPLES
Example #1 strcspn(3) example <?php $a = strcspn('abcd', 'apple'); $b = strcspn('abcd', 'banana'); $c = strcspn('hello', 'l'); $d = strcspn('hello', 'world'); var_dump($a); var_dump($b); var_dump($c); var_dump($d); ?> The above example will output: int(0) int(0) int(2) int(2)
NOTES
Note This function is binary-safe.
SEE ALSO
strspn(3). PHP Documentation Group STRCSPN(3)
Related Man Pages
strspn(3) - linux
strcspn(3) - bsd
strcspn(3) - suse
strspn(3) - suse
strspn(3) - osf1
Similar Topics in the Unix Linux Community
cut First charecter in any string
Convert case on specified position of flat file
Deleting multiple lines from file
how to get value of value of a variable
Find the length of each line in the file