(self)
| 150 | /// Returns `None` if the code point is a surrogate (from U+D800 to U+DFFF). |
| 151 | #[inline] |
| 152 | pub const fn to_char(self) -> Option<char> { |
| 153 | match self.value { |
| 154 | 0xD800..=0xDFFF => None, |
| 155 | _ => Some(unsafe { char::from_u32_unchecked(self.value) }), |
| 156 | } |
| 157 | } |
| 158 | |
| 159 | /// Returns a Unicode scalar value for the code point. |
| 160 | /// |
no test coverage detected