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

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")
}
主站蜘蛛池模板: 玛沁县| 溧水县| 册亨县| 来安县| 玉林市| 治县。| 大港区| 嵩明县| 桃江县| 恭城| 长乐市| 临潭县| 桐庐县| 清河县| 南溪县| 灵寿县| 丰城市| 班玛县| 翼城县| 中山市| 乌海市| 三门峡市| 安徽省| 平乐县| 仁寿县| 汉寿县| 汕尾市| 定边县| 容城县| 龙井市| 连州市| 乐昌市| 长顺县| 贵德县| 铁力市| 通榆县| 营口市| 临泉县| 万全县| 宜兰县| 连州市|