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

Function is_utf8_encoding

crates/vm/src/stdlib/builtins.rs:186–189  ·  view source on GitHub ↗
(name: &str)

Source from the content-addressed store, hash-verified

184 /// Matches: utf-8, utf_8, utf8, UTF-8, etc.
185 #[cfg(feature = "parser")]
186 fn is_utf8_encoding(name: &str) -> bool {
187 let normalized: String = name.chars().filter(|&c| c != '-' && c != '_').collect();
188 normalized.eq_ignore_ascii_case("utf8")
189 }
190
191 #[cfg(feature = "parser")]
192 fn decode_source_bytes(source: &[u8], filename: &str, vm: &VirtualMachine) -> PyResult<String> {

Callers

nothing calls this directly

Calls 4

collectMethod · 0.80
charsMethod · 0.80
eq_ignore_ascii_caseMethod · 0.80
filterMethod · 0.45

Tested by

no test coverage detected