[−][src]Crate multisplice
Easily splice a string multiple times, using offsets into the original string. This way you don't have to track offsets after making a change, which can get hairy very quickly!
Usage
use multisplice::Multisplice; let source = "a b c d e"; let mut splicer = Multisplice::new(source); splicer.splice(2, 3, "beep"); splicer.splice(6, 7, "boop"); assert_eq!(splicer.to_string(), "a beep c boop e".to_string()); assert_eq!(splicer.slice_range((3..7)), " c boop".to_string());
Structs
Multisplice | A multisplice operation. |