Skip to content

Commit

Permalink
Update 02_Zsh-开发指南(第二篇-字符串处理之常用操作).md
Browse files Browse the repository at this point in the history
  • Loading branch information
goreliu authored Apr 30, 2019
1 parent 70e32f4 commit ba17cf1
Showing 1 changed file with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,18 @@ cc
cc
```

```
# 或者先转换成数组
% str="1:2::4"
% str_array=(${(s/:/)str})
% echo $str_array
1 2 4
% echo $str_array[2]
2
% echo $str_array[3]
4
```

### 多行字符串

字符串定义可以跨行。
Expand Down

0 comments on commit ba17cf1

Please sign in to comment.