File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -9,12 +9,12 @@ or 0xE000 to 0x10FFFF range. It is immediate [Undefined Behavior] to create a
99string of length 1.
1010
1111A value of type ` str ` is a Unicode string, represented as an array of 8-bit
12- unsigned bytes holding a sequence of UTF-8 code points. Note that this is a
13- library-level invariant: for the compiler and core language specification, ` str `
14- is the same as ` [u8] ` , but methods working on ` str ` may assume that the data in
15- there is valid UTF-8 and may cause Undefined Behavior otherwise. Since ` str ` is
16- a [ dynamically sized type] , it can only be instantiated through a pointer type,
17- such as ` &str ` .
12+ unsigned bytes holding a sequence of UTF-8 encoded Unicode code points. Note
13+ that this is a library-level invariant: for the compiler and core language
14+ specification, ` str ` is the same as ` [u8] ` , but methods working on ` str ` may
15+ assume that the data in there is valid UTF-8 and may cause Undefined Behavior
16+ otherwise. Since ` str ` is a [ dynamically sized type] , it can only be
17+ instantiated through a pointer type, such as ` &str ` .
1818
1919[ Unicode scalar value ] : http://www.unicode.org/glossary/#unicode_scalar_value
2020[ Undefined Behavior ] : ../behavior-considered-undefined.md
You can’t perform that action at this time.
0 commit comments