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

Method combining

crates/stdlib/src/unicodedata.rs:229–234  ·  view source on GitHub ↗
(&self, character: PyStrRef, vm: &VirtualMachine)

Source from the content-addressed store, hash-verified

227
228 #[pymethod]
229 fn combining(&self, character: PyStrRef, vm: &VirtualMachine) -> PyResult<i32> {
230 Ok(self
231 .extract_char(character, vm)?
232 .and_then(|c| c.to_char())
233 .map_or(0, |ch| ch.canonical_combining_class() as i32))
234 }
235
236 #[pymethod]
237 fn decomposition(&self, character: PyStrRef, vm: &VirtualMachine) -> PyResult<String> {

Callers 2

test_combiningMethod · 0.80

Calls 2

extract_charMethod · 0.80
to_charMethod · 0.45

Tested by 2

test_combiningMethod · 0.64