function

strcspn . string . sncode

VERSIONlatest Find length of initial segment not matching mask.

STRCSPN

NAME

strcspn - Finds length of the initial segment not containing any of the characters that are part of the mask.

SYNOPSIS

strcspn(str,mask,start,length)

PARAMETERS

str
The input string.
mask
The mask characters.
start
The starting position of the string to examine.
length
The length of the string to examine.

RETURN

Returns the length of the segment as an integer.

EXAMPLES

in:  res=<{strcspn('abcd',  'apple', -3)}>.
out: res=3.

in:  res=<{strcspn('abcd',  'apple')}>.
out: res=0.

in:  res=<{strcspn('hello', 'world')}>.
out: res=2.

AUTHOR

Written by Pusnei Sergey and Caroline Laplante, <sergey@sednove.com>