(
&self,
character: PyStrRef,
vm: &VirtualMachine,
)
| 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> { |