Return the position of the first occurrence of the string t in the string s, or 0 if no occurrence is found.
s may also be a string array or cell array of strings.
For example:
index ("Teststring", "t") ⇒ 4
If direction is "first"
, return the first element found.
If direction is "last"
, return the last element found.
See also: find, rindex.
Package: octave