Skip to content

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

License

Notifications You must be signed in to change notification settings

wiseaidev/pad-left

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

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

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages