mirror of https://github.com/rust-lang/reference
Merge pull request #1374 from tshepang/patch-2
str type: make sentence more readable
This commit is contained in:
commit
15c26a1558
|
@ -8,7 +8,7 @@ or 0xE000 to 0x10FFFF range. It is immediate [Undefined Behavior] to create a
|
|||
`char` that falls outside this range. A `[char]` is effectively a UCS-4 / UTF-32
|
||||
string of length 1.
|
||||
|
||||
A value of type `str` is represented the same way as `[u8]`, it is a slice of
|
||||
A value of type `str` is represented the same way as `[u8]`, a slice of
|
||||
8-bit unsigned bytes. However, the Rust standard library makes extra assumptions
|
||||
about `str`: methods working on `str` assume and ensure that the data in there
|
||||
is valid UTF-8. Calling a `str` method with a non-UTF-8 buffer can cause
|
||||
|
|
Loading…
Reference in New Issue