(code: u32)
| 29 | #[inline] |
| 30 | #[must_use] |
| 31 | const fn len_utf16(code: u32) -> usize { |
| 32 | if (code & 0xFFFF) == code { 1 } else { 2 } |
| 33 | } |
| 34 | |
| 35 | /// Encodes a raw `u32` value as UTF-8 into the provided byte buffer, |
| 36 | /// and then returns the subslice of the buffer that contains the encoded character. |