RosettaCodeData/Task/Empty-string/Swift/empty-string.swift
2016-12-05 23:44:36 +01:00

6 lines
113 B
Swift

var s = ""
if s.isEmpty { // alternately, s == ""
println("s is empty")
} else {
println("s is not empty")
}