diff --git a/book/contents/basic/compound-type/string-slice.md b/book/contents/basic/compound-type/string-slice.md index 3657440f..45e0125b 100644 --- a/book/contents/basic/compound-type/string-slice.md +++ b/book/contents/basic/compound-type/string-slice.md @@ -81,7 +81,7 @@ let slice = &s[0..len]; let slice = &s[..]; ``` ->在对字符串使用切片语法时需要格外小心,切片的索引必须落在字符之间的边界位置,也就是UTF8字符的边界,例如中文在UT8中占用三个字节,下面的代码就会崩溃: +>在对字符串使用切片语法时需要格外小心,切片的索引必须落在字符之间的边界位置,也就是UTF8字符的边界,例如中文在UTF8中占用三个字节,下面的代码就会崩溃: >```rust > let s = "中国人"; > let a = &s[0..2];