Crate substring_replace

Source

Traitsยง

FromOffset
Provide from_offset convenience method that allows negative offsets from the end of an array/vector and never extends beyond the array/vector bounds It returns Option<&T> in keeping with the default get() method and because the array or vector may still be empty
SubstringReplace
Trait with extension methods to manipulate substrings by character indices behaving like similar methods in other languages
ToOffset
Trait to allow the main signed and unsigned integer types where negative values are treated as offsets from the end, defined by length -1 == length -1, 0 == start, 1 == second position If the offset underflows, it returns 0. If it overflows, it returns the last index for arrays or the length for integer types.