Skip to content

Commit 8579933

Browse files
committed
Merge branch 'main' into develop
2 parents 2f0a554 + beeb14e commit 8579933

File tree

1 file changed

+21
-14
lines changed

1 file changed

+21
-14
lines changed

README.md

Lines changed: 21 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,22 @@
11
# Leftpad
22

3+
[![CircleCI](https://circleci.com/gh/keltia/leftpad-rs/tree/main.svg?style=shield)](https://circleci.com/gh/keltia/leftpad-rs/tree/main)
4+
[![](https://img.shields.io/crates/v/leftpad-rs.svg)](https://crates.io/crates/leftpad-rs)
5+
[![Docs](https://docs.rs/leftpad-rs/badge.svg)](https://docs.rs/leftpad-rs)
6+
37
Rust package to left pad a string with a character.
48

59
Inspired by the "left-pad" NPM package (and the fiasco that happened after its removal).
610

7-
### Build status
8-
9-
[![CircleCI](https://circleci.com/gh/keltia/leftpad-rs/tree/main.svg?style=shield)](https://circleci.com/gh/keltia/leftpad-rs/tree/main)
10-
11-
### Usage
12-
13-
[![Docs.rs](https://docs.rs/leftpad-rs?status.svg)](https://docs.rs/leftpad-rs)
14-
15-
Add the following to your `Cargo.toml`:
16-
``` toml
17-
[dependencies]
18-
leftpad-rs = "0.1"
19-
```
11+
**Supported Platforms**
12+
* Unix (tested on FreeBSD, Linux and macOS)
13+
* Windows
14+
* cmd.exe
15+
* Powershell
2016

17+
## Example
2118
``` rust
22-
use leftpad_rs::*;
19+
use leftpad_rs::{pad,pad_char};
2320

2421
fn main() {
2522
let s = "foo";
@@ -28,3 +25,13 @@ fn main() {
2825
println!("{:?}", pad_char(s, 5, 'b'));
2926
}
3027
```
28+
## crates.io
29+
You can use this package in your project by adding the following
30+
to your `Cargo.toml`:
31+
32+
``` toml
33+
[dependencies]
34+
leftpad-rs = "1.0.0"
35+
```
36+
then you can use it in your own crates.
37+

0 commit comments

Comments
 (0)