pad_left

Crates.iopad_left
lib.rspad_left
version0.1.2
sourcesrc
created_at2023-05-04 16:48:06.766168
updated_at2023-05-04 17:21:53.305189
descriptionA simple library to left pad a string with a given character up to a certain length.
homepage
repositoryhttps://github.com/wiseaidev/pad-left
max_upload_size
id856886
size17,758
Mahmoud (wiseaidev)

documentation

https://docs.rs/pad_left/

README

pad-left

A simple library to left pad a string with a given character up to a certain length.

Usage

use pad_left::left_pad;

fn main() {
    assert_eq!(left_pad("hello".to_string(), 15, 'πŸš€'), "πŸš€πŸš€πŸš€πŸš€πŸš€πŸš€πŸš€πŸš€πŸš€πŸš€hello".to_string());
}

Run tests

cargo test

Build & Open Docs

cargo doc --open
Commit count: 6

cargo fmt