pub fn slice(s: &String, r: Range<usize>) -> String {
        let mut sub_string = Vec::<String>::new();
        for (i, c) in s.chars().enumerate() {
            if r.contains(&i) {
                sub_string.push(c.to_string());
            }
        }
        sub_string.join("")
    }
/*
    returns a slice of a string from a range, utf-8 compliant
    */
returns a slice of a string from a range, utf-8 compliant
returns a slice of a string from a range utf - 8 compliant
pub fn slice(s: &String, r: Range<usize>) -> String {
        let mut sub_string = Vec::<String>::new();
        for (i, c) in s.chars().enumerate() {
            if r.contains(&i) {
                sub_string.push(c.to_string());
            }
        }
        sub_string.join("")
    }
pub fn slice ( s : & String , r : Range < usize > ) -> String { let mut sub_string = Vec :: < String > :: new ( ) ; for ( i , c ) in s . chars ( ) . enumerate ( ) { if r . contains ( & i ) { sub_string . push ( c . to_string ( ) ) ; } } sub_string . join ( " " ) }
returns a slice of a string from a range, utf-8 compliant
returns a slice of a string from a range utf - 8 compliant
s
&String
r
Range<usize>
s
&String
r
Range<usize>