Skip to content

Latest commit

 

History

History
24 lines (17 loc) · 363 Bytes

README.md

File metadata and controls

24 lines (17 loc) · 363 Bytes

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