[REBOL] Re: [Find] Frustration with Find
From: SunandaDH:aol at: 1-Nov-2004 4:24
> However this throws up a script error as the value of str is set to
> none! and it is now "disconnected" from the series!
I think the issue is that matching the tail of a string is not the same as
not matching any part of it.
(find "abcde" "x") = tail "abcde"
So find can't return any part of the string in the case of a failure. Hence
the none as the response.
If you do want to position at the tail of the string when not found, you
could make a function out of this:
either temp: find head str "c" [str: temp] [str: tail str]
(You won't want the 'head if you want to search from the current position)