@@ -92,7 +92,7 @@ impl char {
92
92
#[ stable( feature = "assoc_char_consts" , since = "1.52.0" ) ]
93
93
pub const UNICODE_VERSION : ( u8 , u8 , u8 ) = crate :: unicode:: UNICODE_VERSION ;
94
94
95
- /// Creates an iterator over the UTF-16 encoded code points in `iter`,
95
+ /// Creates an iterator over the native endian UTF-16 encoded code points in `iter`,
96
96
/// returning unpaired surrogates as `Err`s.
97
97
///
98
98
/// # Examples
@@ -704,7 +704,7 @@ impl char {
704
704
unsafe { from_utf8_unchecked_mut ( encode_utf8_raw ( self as u32 , dst) ) }
705
705
}
706
706
707
- /// Encodes this character as UTF-16 into the provided `u16` buffer,
707
+ /// Encodes this character as native endian UTF-16 into the provided `u16` buffer,
708
708
/// and then returns the subslice of the buffer that contains the encoded character.
709
709
///
710
710
/// # Panics
@@ -1828,7 +1828,7 @@ pub const fn encode_utf8_raw(code: u32, dst: &mut [u8]) -> &mut [u8] {
1828
1828
unsafe { slice:: from_raw_parts_mut ( dst. as_mut_ptr ( ) , len) }
1829
1829
}
1830
1830
1831
- /// Encodes a raw `u32` value as UTF-16 into the provided `u16` buffer,
1831
+ /// Encodes a raw `u32` value as native endian UTF-16 into the provided `u16` buffer,
1832
1832
/// and then returns the subslice of the buffer that contains the encoded character.
1833
1833
///
1834
1834
/// Unlike `char::encode_utf16`, this method also handles codepoints in the surrogate range.
0 commit comments