https://github.com/killercup/replace-rs
https://github.com/killercup/replace-rs
Last synced: 9 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/killercup/replace-rs
- Owner: killercup
- License: apache-2.0
- Created: 2018-05-01T21:43:04.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2018-05-04T20:37:53.000Z (almost 8 years ago)
- Last Synced: 2025-06-02T11:58:08.774Z (10 months ago)
- Language: Rust
- Size: 23.4 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE-APACHE
Awesome Lists containing this project
README
# replace-rs
[](https://travis-ci.org/killercup/replace-rs)
A small crate giving you a simple container
that allows easy and cheap replacement of parts of its content,
with the ability to prevent changing the same parts multiple times.
## Examples
```rust
extern crate replace;
fn main() {
let mut d = Data::new(b"foo bar baz");
d.replace_range(4..7, b"lol", false).unwrap();
assert_eq!("foo lol baz".as_bytes(), d.to_vec().as_slice());
}
```
## License
Licensed under either of
* Apache License, Version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or http://www.apache.org/licenses/LICENSE-2.0)
* MIT license ([LICENSE-MIT](LICENSE-MIT) or http://opensource.org/licenses/MIT)
at your option.
### Contribution
Unless you explicitly state otherwise, any contribution intentionally
submitted for inclusion in the work by you, as defined in the Apache-2.0
license, shall be dual licensed as above, without any additional terms or
conditions.