Octave string indexing
kodingwindow@kw:~$ octave
...
octave> kw = "Kodingwindow"
kw = Kodingwindow

octave> startsWith(kw, "KODING")
ans = 0

octave> startsWith(kw, "Koding")
ans = 1

octave> endsWith(kw, "ing")
ans = 0

octave> endsWith(kw, "dow")
ans = 1

octave> index(kw, "in")
ans = 4

octave> rindex(kw, "in")
ans = 8

octave> unicode_idx(kw)
ans =

    1    2    3    4    5    6    7    8    9   10   11   12

octave> strfind(kw, "WINDOW")
ans = [](0x0)

octave> strfind(kw, "window")
ans = 7
Advertisement