修改类型描述
虽然英文原文是“its Boolean isEmpty property”,但是按照翻译的语义,应该是指的具体返回值的类型Bool
This commit is contained in:
@ -68,7 +68,7 @@ var anotherEmptyString = String() // 初始化方法
|
|||||||
// 两个字符串均为空并等价。
|
// 两个字符串均为空并等价。
|
||||||
```
|
```
|
||||||
|
|
||||||
您可以通过检查其`Boolean`类型的`isEmpty`属性来判断该字符串是否为空:
|
您可以通过检查其`Bool`类型的`isEmpty`属性来判断该字符串是否为空:
|
||||||
|
|
||||||
```swift
|
```swift
|
||||||
if emptyString.isEmpty {
|
if emptyString.isEmpty {
|
||||||
|
|||||||
Reference in New Issue
Block a user