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

Method to_lead_surrogate

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

Source from the content-addressed store, hash-verified

130 /// Returns the numeric value of the code point if it is a leading surrogate.
131 #[inline]
132 pub const fn to_lead_surrogate(self) -> Option<LeadSurrogate> {
133 match self.value {
134 lead @ 0xD800..=0xDBFF => Some(LeadSurrogate(lead as u16)),
135 _ => None,
136 }
137 }
138
139 /// Returns the numeric value of the code point if it is a trailing surrogate.
140 #[inline]

Callers 1

scanstringFunction · 0.80

Calls 2

LeadSurrogateClass · 0.85
SomeClass · 0.50

Tested by

no test coverage detected