RosettaCodeData/Task/Empty-string/Fantom/empty-string.fantom

6 lines
260 B
Plaintext

a := "" // assign an empty string to 'a'
a.isEmpty // method on sys::Str to check if string is empty
a.size == 0 // what isEmpty actually checks
a == "" // alternate check for an empty string
!a.isEmpty // check that a string is not empty