substring_bug_compatible

Function substring_bug_compatible 

Source
pub fn substring_bug_compatible(
    s: &str,
    start: usize,
    length: isize,
) -> Result<String>
Expand description

Index into a substring by start and lengths. Supports negative indices, but replicates an off-by-one error from the original StageL implementation: the length has to be one more than seems intuitive. substring_bug_compatible("test", 0, -2) would return “tes”.