@@ -4,15 +4,15 @@ The types `char` and `str` hold textual data.
44
55A value of type ` char ` is a [ Unicode scalar value] (i.e. a code point that is
66not a surrogate), represented as a 32-bit unsigned word in the 0x0000 to 0xD7FF
7- or 0xE000 to 0x10FFFF range. It is immediate [ Undefined Behavior ] to create a
7+ or 0xE000 to 0x10FFFF range. It is immediate [ undefined behavior ] to create a
88` char ` that falls outside this range. A ` [char] ` is effectively a UCS-4 / UTF-32
99string of length 1.
1010
1111A value of type ` str ` is represented the same way as ` [u8] ` , a slice of
12128-bit unsigned bytes. However, the Rust standard library makes extra assumptions
1313about ` str ` : methods working on ` str ` assume and ensure that the data in there
1414is valid UTF-8. Calling a ` str ` method with a non-UTF-8 buffer can cause
15- [ Undefined Behavior ] now or in the future.
15+ [ undefined behavior ] now or in the future.
1616
1717Since ` str ` is a [ dynamically sized type] , it can only be instantiated through a
1818pointer type, such as ` &str ` .
@@ -26,5 +26,5 @@ Every byte of a `char` is guaranteed to be initialized (in other words,
2626some bit patterns are invalid ` char ` s, the inverse is not always sound).
2727
2828[ Unicode scalar value ] : http://www.unicode.org/glossary/#unicode_scalar_value
29- [ Undefined Behavior ] : ../behavior-considered-undefined.md
29+ [ undefined behavior ] : ../behavior-considered-undefined.md
3030[ dynamically sized type ] : ../dynamically-sized-types.md
0 commit comments