File tree Expand file tree Collapse file tree 1 file changed +21
-14
lines changed Expand file tree Collapse file tree 1 file changed +21
-14
lines changed Original file line number Diff line number Diff line change 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+
37Rust package to left pad a string with a character.
48
59Inspired 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
2421fn 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+
You can’t perform that action at this time.
0 commit comments