pad_left 0.1.1

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

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