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

Method center

crates/vm/src/builtins/str.rs:1316–1323  ·  view source on GitHub ↗
(
        &self,
        width: isize,
        fillchar: OptionalArg<PyStrRef>,
        vm: &VirtualMachine,
    )

Source from the content-addressed store, hash-verified

1314
1315 #[pymethod]
1316 fn center(
1317 &self,
1318 width: isize,
1319 fillchar: OptionalArg<PyStrRef>,
1320 vm: &VirtualMachine,
1321 ) -> PyResult<Wtf8Buf> {
1322 self._pad(width, fillchar, AnyStr::py_center, vm)
1323 }
1324
1325 #[pymethod]
1326 fn ljust(

Callers

nothing calls this directly

Calls 1

_padMethod · 0.45

Tested by

no test coverage detected