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

Method pop

crates/wtf8/src/lib.rs:489–494  ·  view source on GitHub ↗
(&mut self)

Source from the content-addressed store, hash-verified

487 }
488
489 pub fn pop(&mut self) -> Option<CodePoint> {
490 let ch = self.code_points().next_back()?;
491 let new_len = self.len() - ch.len_wtf8();
492 self.bytes.truncate(new_len);
493 Some(ch)
494 }
495
496 /// Shortens a string to the specified length.
497 ///

Callers 7

add_instructionMethod · 0.45
process_instructionMethod · 0.45
parseMethod · 0.45
attrs_to_module_itemsFunction · 0.45
try_fromMethod · 0.45
remove_trailing_zerosFunction · 0.45

Calls 6

code_pointsMethod · 0.80
len_wtf8Method · 0.80
SomeClass · 0.50
next_backMethod · 0.45
lenMethod · 0.45
truncateMethod · 0.45

Tested by 1

process_instructionMethod · 0.36