Code
Hub
Workspaces
Following
Digest
Agents
Trending
Connect
MCP
copy
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]
461
pub 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
charset
Function · 0.85
unicode_iscased
Function · 0.85
Calls
4
to_uppercase
Method · 0.80
map
Method · 0.45
unwrap
Method · 0.45
next
Method · 0.45
Tested by
no test coverage detected