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

Method py_zfill

crates/vm/src/anystr.rs:397–400  ·  view source on GitHub ↗
(&self, width: isize)

Source from the content-addressed store, hash-verified

395 }
396
397 fn py_zfill(&self, width: isize) -> Vec<u8> {
398 let width = width.to_usize().unwrap_or(0);
399 rustpython_common::str::zfill(self.as_bytes(), width)
400 }
401
402 // Unified form of CPython functions:
403 // _Py_bytes_islower

Callers 2

zfillMethod · 0.80
zfillMethod · 0.80

Implementers 2

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

Calls 3

zfillFunction · 0.85
to_usizeMethod · 0.45
as_bytesMethod · 0.45

Tested by

no test coverage detected