[Newbies] break out of do

K. K. Subramaniam subbukk at gmail.com
Fri Oct 3 15:07:43 UTC 2008


On Friday 03 Oct 2008 6:34:24 pm Mark Volkmann wrote:
> Is there a way to break out of a do:? For example, if I use do: to
> iterate through the characters in a string and I find a character I
> don't want to allow, can I break out and avoid examining the remaining
> characters?
A string is a collection and there are a rich set of methods for iterating 
over a collection. Bring up method search tool (ALT+Shift+W or 
WorldMenu->windows->find message names) and enter "includes" you will find 
methods like includes:, includesAnyOf:, includesAllOf:, anySatisfy: and so 
on.

The Method search tool is a really nifty tool for searching out methods.

Subbu


More information about the Beginners mailing list