lengths from the beginning of strings until a character among those prohibited
res = strcspn(Strings, forbiddenChars)
a character string or matrix of character strings.
a character string or matrix of character strings.
Matrix of positive real integers, of the size of Strings
:
lengths of the selected Strings
heads.
res = strcspn(Strings, forbiddenChars)
scans
Strings
for the first occurrence of any of the
characters that are part of forbiddenChars
, returning
the number of characters of Strings
read
before this first occurrence.
forbiddenChars
must have same dimensions than
Strings
or forbiddenChars
must be a string.