|
Contents | Previous | Next | Subchapters |
| Syntax |
strreplace(x, oldString, newString)x, oldString, newString, matchCase)
|
| See Also | lower , ntoa , atod , atoi , char , file2str , align , find2 |
strreplace("Hello World", "Hello", "Hi")
O-Matrix will respond
Hi World
The strreplace function can also replace
strings in matrices with more than one row and patterns
that do not have the same length.
If you enter
M = {"aA1a","a1"}
strreplace(M, "a", "bb")
O-Matrix will return,
bbA1bb
bb1
By default, the strreplace function is
case sensitive, and patterns must match exactly to be
replaced. If you continue the example above by entering,
strreplace(M, "a", "bb", false)
O-Matrix will respond
bbbb1bb
bb1