RosettaCodeData/Task/Empty-string/Smalltalk/empty-string.st

13 lines
204 B
Smalltalk

"Assign empty string to a variable"
str := ''.
"Check that string is empty"
str isEmpty.
"Check that string is not empty"
str isEmpty not.
"alternatives:"
str notEmpty
str size = 0
str = ''