strstrlocate substringCalling Sequenceres = strstr(haystack, needle)Argumentshaystack
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.
Descriptionres = 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.
ExamplesSee Also
strrchr
strchr