/// PARAMS: vector = a vector of strings,
/// wildcard = a wildcard string.
/// this function will output a new
/// vector of all of items that contain the
/// wildcard.
vector = a vector of strings,
wildcard = a wildcard string.
this function will output a new
vector of all of items that contain the
wildcard.
vector = a vector of strings wildcard = a wildcard string . this function will output a new vector of all of items that contain the wildcard .
pub fn contains_substring(vector: Vec<String>, wildcard: String) -> Vec<String> {
    let mut contains_sub_vec = vec![];
    for item in vector {
        if item.contains(&wildcard) {
            contains_sub_vec.push(item);
        }
    }
    return contains_sub_vec;
}
pub fn contains_substring ( vector : Vec < String > , wildcard : String ) -> Vec < String > { let mut contains_sub_vec = vec ! [ ] ; for item in vector { if item . contains ( & wildcard ) { contains_sub_vec . push ( item ) ; } } return contains_sub_vec ; }
PARAMS: vector = a vector of strings,
wildcard = a wildcard string.
PARAMS : vector = a vector of strings wildcard = a wildcard string .
vector
Vec<String>
wildcard
String