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

Method east_asian_width

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

Source from the content-addressed store, hash-verified

175 /// NOTE: This function uses 9.0.0 database instead of 3.2.0
176 #[pymethod]
177 fn east_asian_width(
178 &self,
179 character: PyStrRef,
180 vm: &VirtualMachine,
181 ) -> PyResult<&'static str> {
182 Ok(self
183 .extract_char(character, vm)?
184 .and_then(|c| c.to_char())
185 .map_or(EastAsianWidth::Neutral, |c| c.east_asian_width())
186 .abbr_name())
187 }
188
189 #[pymethod]
190 fn normalize(&self, form: super::NormalizeForm, unistr: PyStrRef) -> PyResult<Wtf8Buf> {

Callers 5

_display_widthFunction · 0.80
str_widthFunction · 0.80

Calls 3

abbr_nameMethod · 0.80
extract_charMethod · 0.80
to_charMethod · 0.45

Tested by 2