![Swift Functional Programming(Second Edition)](https://wfqqreader-1252317822.image.myqcloud.com/cover/293/36701293/b_36701293.jpg)
上QQ阅读APP看书,第一时间看更新
Empty Strings
Empty Strings can be initialized as follows:
// Initializing an Empty String
var anEmptyString = ""
var anotherEmptyString = String()
These two strings are both empty and equivalent to each other. To find out whether a String is empty, the isEmpty property can be used as follows:
if anEmptyString.isEmpty {
print("String is empty")
}