@@ -92,7 +92,7 @@ impl char {
9292 #[ stable( feature = "assoc_char_consts" , since = "1.52.0" ) ]
9393 pub const UNICODE_VERSION : ( u8 , u8 , u8 ) = crate :: unicode:: UNICODE_VERSION ;
9494
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`,
9696 /// returning unpaired surrogates as `Err`s.
9797 ///
9898 /// # Examples
@@ -704,7 +704,7 @@ impl char {
704704 unsafe { from_utf8_unchecked_mut ( encode_utf8_raw ( self as u32 , dst) ) }
705705 }
706706
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,
708708 /// and then returns the subslice of the buffer that contains the encoded character.
709709 ///
710710 /// # Panics
@@ -1828,7 +1828,7 @@ pub const fn encode_utf8_raw(code: u32, dst: &mut [u8]) -> &mut [u8] {
18281828 unsafe { slice:: from_raw_parts_mut ( dst. as_mut_ptr ( ) , len) }
18291829}
18301830
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,
18321832/// and then returns the subslice of the buffer that contains the encoded character.
18331833///
18341834/// Unlike `char::encode_utf16`, this method also handles codepoints in the surrogate range.
0 commit comments