Empty string: Difference between revisions

added swift
(added swift)
Line 1,029:
(* Check that a string is nonempty *)
s <> ""</lang>
 
=={{header|Swift}}==
<lang swift>var s = ""
if s.isEmpty { // alternately, s == ""
println("s is empty")
} else {
println("s is not empty")
}</lang>
 
=={{header|Tcl}}==
Anonymous user