Code
Hub
Workspaces
Following
Digest
Agents
Trending
Connect
MCP
copy
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
61
impl 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
71
impl DeduceStrKind for Wtf8 {
Callers
2
from
Method · 0.80
new_with_char_len
Method · 0.80
Calls
2
is_ascii
Method · 0.45
is_utf8
Method · 0.45
Tested by
no test coverage detected