官术网_书友最值得收藏!

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")
}
主站蜘蛛池模板: 天镇县| 雷州市| 太仆寺旗| 招远市| 馆陶县| 合山市| 左贡县| 鱼台县| 左云县| 丰原市| 阜阳市| 潮州市| 哈密市| 辽阳市| 新安县| 沙坪坝区| 镇康县| 五原县| 忻州市| 佛教| 若羌县| 女性| 从化市| 监利县| 卫辉市| 宽甸| 岳普湖县| 高陵县| 嘉祥县| 山阳县| 水城县| 广南县| 汕头市| 吐鲁番市| 罗定市| 葫芦岛市| 翁牛特旗| 开阳县| 潢川县| 阜宁县| 镇宁|