strcspn(3) php man page | unix.com

Man Page: strcspn

Operating Environment: php

Section: 3

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
strcspn(3p) - centos
strspn(3) - suse
strcspn(3p) - suse
strspn(3) - osf1
strcspn(3) - osx
Similar Topics in the Unix Linux Community
string manipulation
cut First charecter in any string
Deleting multiple lines from file
bash shell scripting error need help urgently
Script to remove duplicates