MCPcopy Index your code
hub / github.com/endbasic/endbasic / remove

Method remove

std/src/console/linebuffer.rs:86–88  ·  view source on GitHub ↗

Removes a character from this buffer. If the given position if greater than the length of the buffer, this function does nothing.

(&mut self, pos: usize)

Source from the content-addressed store, hash-verified

84 ///
85 /// If the given position if greater than the length of the buffer, this function does nothing.
86 pub fn remove(&mut self, pos: usize) {
87 self.line = self.line.chars().take(pos).chain(self.line.chars().skip(pos + 1)).collect();
88 }
89
90 /// Inserts a char at the given position.
91 ///

Callers 14

delete_fileMethod · 0.80
clearMethod · 0.80
erase_atMethod · 0.80
do_backspaceMethod · 0.80
do_deleteMethod · 0.80
test_removeFunction · 0.80
take_flagMethod · 0.80
take_keyed_flag_strMethod · 0.80
unmountMethod · 0.80
deleteMethod · 0.80
update_aclsMethod · 0.80

Calls 1

charsMethod · 0.80

Tested by 3

test_removeFunction · 0.64
take_flagMethod · 0.64
take_keyed_flag_strMethod · 0.64