Skip to content

Commit

Permalink
Merge pull request #777 from 769344359/patch-3
Browse files Browse the repository at this point in the history
Update ch04-03-slices.md
  • Loading branch information
KaiserY committed Mar 3, 2024
2 parents d6847b9 + 5fa8be7 commit 255e62b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ch04-03-slices.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
> <br>
> commit 3d51f70c78162faaebcab0da0de2ddd333e7a8ed
*slice* 允许你引用集合中一段连续的元素序列,而不用引用整个集合。slice 是一类引用,所以它没有所有权。
*slice* 允许你引用集合中一段连续的元素序列,而不用引用整个集合。slice 是一种引用,所以它没有所有权。

这里有一个编程小习题:编写一个函数,该函数接收一个用空格分隔单词的字符串,并返回在该字符串中找到的第一个单词。如果函数在该字符串中并未找到空格,则整个字符串就是一个单词,所以应该返回整个字符串。

Expand Down

0 comments on commit 255e62b

Please sign in to comment.