8 releases

0.1.7 Mar 19, 2022
0.1.6 Apr 22, 2021
0.1.5 Aug 1, 2020
0.1.4 Jul 29, 2020
0.1.3 Jun 29, 2020

#115 in No standard library

Download history 1473/week @ 2023-12-14 482/week @ 2023-12-21 635/week @ 2023-12-28 1421/week @ 2024-01-04 1040/week @ 2024-01-11 1443/week @ 2024-01-18 1509/week @ 2024-01-25 1438/week @ 2024-02-01 1579/week @ 2024-02-08 1232/week @ 2024-02-15 1403/week @ 2024-02-22 1336/week @ 2024-02-29 1519/week @ 2024-03-07 3186/week @ 2024-03-14 9404/week @ 2024-03-21 13604/week @ 2024-03-28

27,990 downloads per month
Used in 27 crates (6 directly)

MIT license

6KB
78 lines

Trim in-place

CI

This crate is used for extending String in order to do in-place trimming.

Usage

use trim_in_place::TrimInPlace;

let mut s = String::from(" 1234 abcd  ");

s.trim_in_place();

assert_eq!("1234 abcd", s);

Benchmark

cargo bench

Crates.io

https://crates.io/crates/trim-in-place

Documentation

https://docs.rs/trim-in-place

License

MIT


lib.rs:

Trim in-place

This crate is used for extending String in order to do in-place trimming.

Usage

use trim_in_place::TrimInPlace;

let mut s = String::from(" 1234 abcd  ");

s.trim_in_place();

assert_eq!("1234 abcd", s);

Benchmark

cargo bench

No runtime deps