pub fn parse_last_arg(arg_list: &[String]) -> Option<String> {
    if arg_list.len() > 1 {
        match arg_list.get(arg_list.len() - 1) {
            Some(x) => Some(x.clone()),
            None => None,
        }
    } else {
        None // return None if this is an executable only (e.g. only includes index position 0 with length = 1) command
    }
}
/// Returns `Option<String>` with the last positional argument to the executable.
/// Returns `None` if the command was entered as the executable only.
Returns `Option` with the last positional argument to the executable.
Returns `None` if the command was entered as the executable only.
Returns ` Option ` with the last positional argument to the executable . Returns ` None ` if the command was entered as the executable only .
pub fn parse_last_arg(arg_list: &[String]) -> Option<String> {
    if arg_list.len() > 1 {
        match arg_list.get(arg_list.len() - 1) {
            Some(x) => Some(x.clone()),
            None => None,
        }
    } else {
        None // return None if this is an executable only (e.g. only includes index position 0 with length = 1) command
    }
}
pub fn parse_last_arg ( arg_list : & [ String ] ) -> Option < String > { if arg_list . len ( ) > 1 { match arg_list . get ( arg_list . len ( ) - 1 ) { Some ( x ) => Some ( x . clone ( ) ) , None => None , } } else { None // return None if this is an executable only (e.g. only includes index position 0 with length = 1) command } }
Returns `Option<String>` with the last positional argument to the executable.
Returns ` Option<String > ` with the last positional argument to the executable .
arg_list
&[String]
arg_list
&[String]