[Newbies] testing a String argument

Mark Volkmann mark at ociweb.com
Thu Oct 2 19:20:31 UTC 2008


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.

---
Mark Volkmann






More information about the Beginners mailing list