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

Function upper_unicode

crates/sre_engine/src/string.rs:461–466  ·  view source on GitHub ↗
(ch: u32)

Source from the content-addressed store, hash-verified

459}
460#[inline]
461pub fn upper_unicode(ch: u32) -> u32 {
462 // TODO: check with cpython
463 char::try_from(ch)
464 .map(|x| x.to_uppercase().next().unwrap() as u32)
465 .unwrap_or(ch)
466}

Callers 2

charsetFunction · 0.85
unicode_iscasedFunction · 0.85

Calls 4

to_uppercaseMethod · 0.80
mapMethod · 0.45
unwrapMethod · 0.45
nextMethod · 0.45

Tested by

no test coverage detected