Scilab 5.3.0
- Scilab Online Help
- Strings
- ascii
- blanks
- code2str
- convstr
- emptystr
- eval
- evstr
- grep
- isalphanum
- isascii
- isdigit
- isletter
- isnum
- justify
- length
- part
- regexp
- sci2exp
- str2code
- strcat
- strchr
- strcmp
- strcmpi
- strcspn
- strindex
- string
- strings
- stripblanks
- strncpy
- strrchr
- strrev
- strsplit
- strspn
- strstr
- strsubst
- strtod
- strtok
- tokenpos
- tokens
- tree2code
Please note that the recommended version of Scilab is 2025.0.0. This page might be outdated.
See the recommended documentation of this function
strcspn
Get span until character in string
Calling Sequence
res = strcspn(string_one,string_two)
Arguments
- string_one
A character string or matrix of character strings
- string_two
A character string or matrix of character strings
- res
matrix.
Description
res = strcspn(string_one,string_two)
Scans
string_one for the first occurrence of any of the characters that are part
of string_two, returning the number of characters of string_one read
before this first occurrence.
string_one must have same dimensions than string_two or string_one must be a string.
Examples
strcspn("fcba73","1234567890") strcspn(["fcba73","f7cba73"],"1234567890") strcspn(["fcba73","f7cba73"],["312","34567890"])
See Also
<< strcmpi | Strings | strindex >> |