> - There's some logic to returning where the cursor landed after deciding
> that the iterative
> search has failed, so when searching the whole string, returning the
> post-end or pre-begin
> cursor makes some sense. But when searching a sub-range from START to
> END, this logic would
> dictate returning END or (string-cursor-prev START) on not-found. But
> this doc requires
> returning the post-end or pre-begin cursor of the entire string
> instead.
This is what chibi does.
(string-find/cursors pred string start end)
Returns a cursor referring to the first character in the substring of string from start (inclusive) to end (exclusive) that satisfies pred, or end if there is none.
(string-find-right/cursors pred string start end)
Returns a cursor referring to the first character in the substring of string from end (exclusive) to start (inclusive) that satisfies pred, processing it in reverse order, or (string-cursor-prev string start) if there is none.
-----------------------------------------------------------------------------