MCPcopy Index your code
hub / github.com/RustPython/RustPython / to_char_lossy

Method to_char_lossy

crates/wtf8/src/lib.rs:164–166  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

162 /// if the code point is a surrogate (from U+D800 to U+DFFF).
163 #[inline]
164 pub fn to_char_lossy(self) -> char {
165 self.to_char().unwrap_or('\u{FFFD}')
166 }
167
168 pub fn is_char_and(self, f: impl FnOnce(char) -> bool) -> bool {
169 self.to_char().is_some_and(f)

Callers 5

scanstringFunction · 0.45
titleMethod · 0.45
swapcaseMethod · 0.45
splitlinesMethod · 0.45
fmtMethod · 0.45

Calls 1

to_charMethod · 0.45

Tested by

no test coverage detected