Skip to content

💥 Crate for left padding a string in the Rust programming language.

License

Notifications You must be signed in to change notification settings

abs0luty/leftpad

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

leftpad-str crate.

Obviously the best crate for the Rust programming language. The crate serves the only goal of implementing leftpad function:

pub fn leftpad(input: &str, width: usize, padding_char: char) -> String;

Examples

assert_eq!(leftpad("hello", 8, '*'), "***hello");
assert_eq!(leftpad("rust", 6, ' '), "  rust");

About

💥 Crate for left padding a string in the Rust programming language.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages