https://github.com/magiclen/trim-in-place
In-place trimming strings.
https://github.com/magiclen/trim-in-place
rust trim
Last synced: 8 months ago
JSON representation
In-place trimming strings.
- Host: GitHub
- URL: https://github.com/magiclen/trim-in-place
- Owner: magiclen
- License: mit
- Created: 2020-06-08T07:28:36.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2024-05-03T23:17:04.000Z (about 2 years ago)
- Last Synced: 2025-03-24T17:55:17.453Z (about 1 year ago)
- Topics: rust, trim
- Language: Rust
- Homepage:
- Size: 19.5 KB
- Stars: 6
- Watchers: 2
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Trim in-place
====================
[](https://github.com/magiclen/trim-in-place/actions/workflows/ci.yml)
This crate is used for extending `String` in order to do in-place trimming.
## Usage
```rust
use trim_in_place::TrimInPlace;
let mut s = String::from(" 1234 abcd ");
s.trim_in_place();
assert_eq!("1234 abcd", s);
```
## Benchmark
```bash
cargo bench
```
## Crates.io
https://crates.io/crates/trim-in-place
## Documentation
https://docs.rs/trim-in-place
## License
[MIT](LICENSE)