An open API service indexing awesome lists of open source software.

https://github.com/wiseaidev/pad-left

A simple library to left pad a string with a given character up to a certain length.
https://github.com/wiseaidev/pad-left

left-pad pad padding rust

Last synced: 10 months ago
JSON representation

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

Awesome Lists containing this project

README

          

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

## Usage

```rust
use pad_left::left_pad;

fn main() {
assert_eq!(left_pad("hello".to_string(), 15, 'πŸš€'), "πŸš€πŸš€πŸš€πŸš€πŸš€πŸš€πŸš€πŸš€πŸš€πŸš€hello".to_string());
}
```

## Run tests

```sh
cargo test
```

## Build & Open Docs

```sh
cargo doc --open
```