- Swift Functional Programming(Second Edition)
- Dr. Fatih Nayebi
- 56字
- 2021-07-02 23:54:24
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")
}
推薦閱讀
- LibGDX Game Development Essentials
- Learning Spring Boot
- 分布式數(shù)據(jù)庫系統(tǒng):大數(shù)據(jù)時代新型數(shù)據(jù)庫技術(第3版)
- Sybase數(shù)據(jù)庫在UNIX、Windows上的實施和管理
- Ceph源碼分析
- WS-BPEL 2.0 Beginner's Guide
- 編寫有效用例
- Chef Essentials
- Web Services Testing with soapUI
- 改變未來的九大算法
- MySQL技術內幕:InnoDB存儲引擎
- 數(shù)據(jù)挖掘與機器學習-WEKA應用技術與實踐(第二版)
- Delphi High Performance
- 掌中寶:電腦綜合應用技巧
- SQL Server 2012 數(shù)據(jù)庫教程(第3版)