Return a search iterator for a given pattern. The iterator sets the current text selection as appropriate. For example:
auto t = new Text ("hello world"); auto s = t.search ("world"); assert (s.next); assert (t.selection() == "world");
Replacing patterns operates in a similar fashion:
auto t = new Text ("hello world"); auto s = t.search ("world"); // replace all instances of "world" with "everyone" assert (s.replace ("everyone")); assert (s.count is 0);
See Implementation
Return a search iterator for a given pattern. The iterator sets the current text selection as appropriate. For example:
Replacing patterns operates in a similar fashion: