| Crates.io | pad_left |
| lib.rs | pad_left |
| version | 0.1.2 |
| created_at | 2023-05-04 16:48:06.766168+00 |
| updated_at | 2023-05-04 17:21:53.305189+00 |
| description | A simple library to left pad a string with a given character up to a certain length. |
| homepage | |
| repository | https://github.com/wiseaidev/pad-left |
| max_upload_size | |
| id | 856886 |
| size | 17,758 |
A simple library to left pad a string with a given character up to a certain length.
use pad_left::left_pad;
fn main() {
assert_eq!(left_pad("hello".to_string(), 15, 'π'), "ππππππππππhello".to_string());
}
cargo test
cargo doc --open