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

Method py_ljust

crates/vm/src/anystr.rs:296–298  ·  view source on GitHub ↗
(&self, width: usize, fillchar: Self::Char, len: usize)

Source from the content-addressed store, hash-verified

294 }
295
296 fn py_ljust(&self, width: usize, fillchar: Self::Char, len: usize) -> Self::Container {
297 self.py_pad(0, width - len, fillchar)
298 }
299
300 fn py_rjust(&self, width: usize, fillchar: Self::Char, len: usize) -> Self::Container {
301 self.py_pad(width - len, 0, fillchar)

Callers

nothing calls this directly

Implementers 2

bytes_inner.rscrates/vm/src/bytes_inner.rs
str.rscrates/vm/src/builtins/str.rs

Calls 1

py_padMethod · 0.80

Tested by

no test coverage detected