doc: update docs/cs.md (#514)

This commit is contained in:
suyangzuo 2024-02-08 14:56:15 +08:00 committed by GitHub
parent e391ce4cd3
commit c60876d078
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -289,6 +289,17 @@ Console.WriteLine(multiLine); // => Content begin "Hello World!" /\n<>"" end.
### 字符串操作
#### 字符串判空
```cs
string name; //空引用
string gender = ""; //空值
// 使用 string.IsNullOrEmpty(字符串) 方法,返回 bool 型
Console.WriteLine(string.IsNullOrEmpty(name)); //输出 true
Console.WriteLine(string.IsNullOrEmpty(gender)); // 输出 true
```
#### 字符串分割
```cs