MCPcopy Create free account
hub / github.com/ashvardanian/StringZilla / next

Method next

rust/stringzilla.rs:2076–2088  ·  view source on GitHub ↗
(&mut self)

Source from the content-addressed store, hash-verified

2074 type Item = char;
2075
2076 fn next(&mut self) -> Option<char> {
2077 // If runes buffer is exhausted, decode next batch
2078 if self.runes_offset >= self.runes_count {
2079 self.decode_batch();
2080 if self.runes_count == 0 {
2081 return None;
2082 }
2083 }
2084
2085 let codepoint = self.runes[self.runes_offset];
2086 self.runes_offset += 1;
2087 char::from_u32(codepoint)
2088 }
2089
2090 fn size_hint(&self) -> (usize, Option<usize>) {
2091 // Lower bound: remaining runes in current buffer

Callers

nothing calls this directly

Calls 9

find_newline_utf8Function · 0.85
find_whitespace_utf8Function · 0.85
decode_batchMethod · 0.80
lenMethod · 0.80
as_ptrMethod · 0.80
findMethod · 0.45
needle_lengthMethod · 0.45
skip_lengthMethod · 0.45

Tested by

no test coverage detected