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

Method write

terminal/src/lib.rs:421–428  ·  view source on GitHub ↗
(&mut self, text: &str)

Source from the content-addressed store, hash-verified

419 }
420
421 fn write(&mut self, text: &str) -> io::Result<()> {
422 let text = remove_control_chars(text.to_owned());
423
424 let stdout = io::stdout();
425 let mut stdout = stdout.lock();
426 stdout.write_all(text.as_bytes())?;
427 self.maybe_flush(stdout)
428 }
429
430 fn sync_now(&mut self) -> io::Result<()> {
431 if self.sync_enabled { Ok(()) } else { io::stdout().flush() }

Callers

nothing calls this directly

Calls 3

remove_control_charsFunction · 0.85
as_bytesMethod · 0.80
maybe_flushMethod · 0.45

Tested by

no test coverage detected