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

Function iter_code_points

crates/common/src/encodings.rs:109–113  ·  view source on GitHub ↗
(w: &Wtf8)

Source from the content-addressed store, hash-verified

107}
108
109fn iter_code_points(w: &Wtf8) -> impl Iterator<Item = (StrSize, CodePoint)> {
110 w.code_point_indices()
111 .enumerate()
112 .map(|(chars, (bytes, c))| (StrSize { bytes, chars }, c))
113}
114
115impl ops::Add for StrSize {
116 type Output = Self;

Callers 2

encode_utf8_compatibleFunction · 0.85
encodeFunction · 0.85

Calls 2

code_point_indicesMethod · 0.80
mapMethod · 0.45

Tested by

no test coverage detected