[−][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); // static string splicer.splice(2, 3, "beep"); // owned string splicer.splice(6, 7, "boop".to_string()); assert_eq!(splicer.to_string(), "a beep c boop e"); assert_eq!(splicer.slice_range((3..7)), " c boop");
Structs
Multisplice | A multisplice operation. |