Am 02.10.2008 um 12:20 schrieb Mark Volkmann:

What's the best way to set a local variable to true if an argument that is supposed to be a String isn't nil and has a size of at least 1? I know I can do this.

hasContent := aString notNil and: [ aString isEmpty not ].

but it feels like I'm making this simple test too hard.


Use #isEmptyOrNil.

- Bert -

_______________________________________________
Beginners mailing list
[email protected]
http://lists.squeakfoundation.org/mailman/listinfo/beginners

Reply via email to