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

#48 in No standard library

Download history 45793/week @ 2024-07-20 41605/week @ 2024-07-27 49216/week @ 2024-08-03 58288/week @ 2024-08-10 58276/week @ 2024-08-17 59151/week @ 2024-08-24 54916/week @ 2024-08-31 58418/week @ 2024-09-07 53453/week @ 2024-09-14 58438/week @ 2024-09-21 69238/week @ 2024-09-28 59375/week @ 2024-10-05 77445/week @ 2024-10-12 69421/week @ 2024-10-19 72180/week @ 2024-10-26 64473/week @ 2024-11-02

291,570 downloads per month
Used in 120 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