MCPcopy Index your code
hub / github.com/aiscriptdev/aiscript / next2

Method next2

aiscript-lexer/src/lib.rs:294–303  ·  view source on GitHub ↗

Returns the next 2 characters as a string slice

(&mut self)

Source from the content-addressed store, hash-verified

292
293 // Returns the next 2 characters as a string slice
294 fn next2(&mut self) -> &str {
295 let mut chars = self.source[self.current..].char_indices();
296 match chars.nth(1) {
297 Some((end_offset, ch)) => {
298 let end = self.current + end_offset + ch.len_utf8();
299 &self.source[self.current..end]
300 }
301 None => &self.source[self.current..],
302 }
303 }
304
305 // Skips whitespace and comments
306 fn skip_white_spaces(&mut self) {

Callers 2

skip_white_spacesMethod · 0.80
scan_docstringMethod · 0.80

Calls 1

nthMethod · 0.80

Tested by

no test coverage detected