get_vec_by_splitting_path

Function get_vec_by_splitting_path 

Source
pub fn get_vec_by_splitting_path<T: Debug + Display>(
    arg_string_path: &T,
) -> Option<Vec<String>>
Expand description

Returns a vec resulting from splitting the path into substrings Returns None in case of failure

§Arguments

  • arg_string_path: a string-like path

§Examples

let vec_of_substrings = match get_vec_by_splitting_path( &“/A/B/C/D” ) { Some( vec_result ) => { vec_result } None => { panic!( “Failed to split path.” ) } }; // vec_of_substrings = [ “A”, “B”, “C”, “D” ]