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

Method str_kind

crates/common/src/str.rs:62–68  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

60
61impl DeduceStrKind for str {
62 fn str_kind(&self) -> StrKind {
63 if self.is_ascii() {
64 StrKind::Ascii
65 } else {
66 StrKind::Utf8
67 }
68 }
69}
70
71impl DeduceStrKind for Wtf8 {

Callers 2

fromMethod · 0.80
new_with_char_lenMethod · 0.80

Calls 2

is_asciiMethod · 0.45
is_utf8Method · 0.45

Tested by

no test coverage detected