leftpad-str

Crates.ioleftpad-str
lib.rsleftpad-str
version9.9.9
sourcesrc
created_at2023-06-08 12:26:35.88604
updated_at2023-06-08 13:49:51.725412
descriptionObviously the best crate for the Rust programming language. The crate serves the only goal of implementing `leftpad` function.
homepage
repositoryhttps://github.com/abs0luty/leftpad
max_upload_size
id885462
size540,169
Adi Salimgereyev (abs0luty)

documentation

https://docs.rs/leftpad-str

README

leftpad-str crate.

Obviously the best crate for the Rust programming language. The crate serves the only goal of implementing leftpad function:

pub fn leftpad(input: &str, width: usize, padding_char: char) -> String;

Examples

assert_eq!(leftpad("hello", 8, '*'), "***hello");
assert_eq!(leftpad("rust", 6, ' '), "  rust");
Commit count: 6

cargo fmt