mirror of
https://github.com/rust-lang-cn/book-cn.git
synced 2025-01-23 23:50:25 +08:00
The word of the day is *string slice*
This commit is contained in:
parent
d56e5367cb
commit
021998f193
@ -13,7 +13,7 @@ can seem difficult coming from other languages.
|
||||
|
||||
Before we can dig into those aspects, we need to talk about what exactly we
|
||||
even mean by the word 'string'. Rust actually only has one string type in the
|
||||
core language itself: `&str`. We talked about these string slices in Chapter 4:
|
||||
core language itself: `&str`. We talked about *string slices* in Chapter 4:
|
||||
they're a reference to some UTF-8 encoded string data stored somewhere else.
|
||||
String literals, for example, are stored in the binary output of the program,
|
||||
and are therefore string slices.
|
||||
|
Loading…
Reference in New Issue
Block a user