fn rm_first_last_char<'a>(value: &'a str, first: bool, last: bool, chars_to_rm: Vec<&str>) -> &'a str {
    let mut chars = value.chars();
    for char in chars_to_rm {
        if first && value.starts_with(char) {
            chars.next();
        }
        if last && value.ends_with(char) {
            chars.next_back();
        }
    }
    chars.as_str()
}
//Used to remove the ' or " in a bash alias
Used to remove the ' or " in a bash alias
Used to remove the ' or " in a bash alias
fn rm_first_last_char<'a>(value: &'a str, first: bool, last: bool, chars_to_rm: Vec<&str>) -> &'a str {
    let mut chars = value.chars();
    for char in chars_to_rm {
        if first && value.starts_with(char) {
            chars.next();
        }
        if last && value.ends_with(char) {
            chars.next_back();
        }
    }
    chars.as_str()
}
fn rm_first_last_char < ' a > ( value : & ' a str , first : bool , last : bool , chars_to_rm : Vec < & str > ) -> & ' a str { let mut chars = value . chars ( ) ; for char in chars_to_rm { if first && value . starts_with ( char ) { chars . next ( ) ; } if last && value . ends_with ( char ) { chars . next_back ( ) ; } } chars . as_str ( ) }
Used to remove the ' or " in a bash alias
Used to remove the ' or " in a bash alias
value
&'a str
first
bool
last
bool
chars_to_rm
Vec<&str>
value
&'a str
first
bool
last
bool
chars_to_rm
Vec<&str>