strfind
Find one string within another.
Syntax
Section titled “Syntax”k = strfind(str, pattern)Description
Section titled “Description”Returns a vector of starting indices of every occurrence of pattern in str. Returns empty if no match. Asymmetric: pattern is searched within str (unlike findstr which searches the shorter within the longer).
Examples
Section titled “Examples”strfind('hello world hello', 'hello') % [1 13]strfind('abcdef', 'xyz') % []