| www.delorie.com/gnu/docs/octave/octave_55.html | search |
![]() Buy GNU books! | |
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
findstr ("ababab", "a")
=> [ 1, 3, 5 ]
findstr ("abababa", "aba", 0)
=> [ 1, 5 ]
|
index ("Teststring", "t")
=> 4
|
Note: This function does not work for arrays of strings.
rindex ("Teststring", "t")
=> 6
|
Note: This function does not work for arrays of strings.
split ("Test string", "t")
=> "Tes "
" s "
"ring"
|
Note: For compatibility with MATLAB, Octave's strcmp function returns 1 if the strings are equal, and 0 otherwise. This is just the opposite of the corresponding C library function.
strrep ("This is a test string", "is", "&%$")
=> "Th&%$ &%$ a test string"
|
substr ("This is a test string", 6, 9)
=> "is a test"
|
Note:
This function is patterned after AWK. You can get the same result by
s (beg : (beg + len - 1)).
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
| webmaster donations bookstore | delorie software privacy |
| Copyright © 2003 by The Free Software Foundation | Updated Jun 2003 |