pad_left 0.1.2

A simple library to left pad a string with a given character up to a certain length.
Documentation
  • Coverage
  • 50%
    1 out of 2 items documented1 out of 1 items with examples
  • Size
  • Source code size: 17.42 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 1.07 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 10s Average build duration of successful builds.
  • all releases: 10s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • wiseaidev/pad-left
    0 1 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • wiseaidev

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