Scilab 6.0.0
- Aide de Scilab
- Chaînes de caractères
- asciimat
- eval
- evstr
- isnum
- string
- ascii
- blanks
- char
- convstr
- emptystr
- grep
- isalphanum
- isascii
- isdigit
- isletter
- justify
- length
- part
- regexp
- sci2exp
- strcat
- strchr
- strcmp
- strcmpi
- strcspn
- strindex
- strings
- stripblanks
- strncpy
- strrchr
- strrev
- strsplit
- strspn
- strstr
- strsubst
- strtod
- strtok
- tokenpos
- tokens
Aide de Scilab >> Chaînes de caractères > strstr
strstr
locate substring
Syntax
res = strstr(haystack, needle)
Arguments
- haystack
a character string or matrix of character strings.
- needle
a character string or matrix of character strings.
- res
a character string or matrix of character strings.
Description
res = strstr(haystack, needle)
returns a string matrix
starting from where the first occurrence of
needle
in haystack
to the end
of haystack
, or ''
if there
needle
is not part of haystack
.
Examples
strstr('This is a simple string','simple') strstr('This is a simple string','sample') strstr(['This is a simple string','in scilab'],'is') strstr(['This is a sample string','in scilab'],['a','scilab'])
Comments
Add a comment:
Please login to comment this page.