Skip to main content

shift_sequence

Function shift_sequence 

Source
pub fn shift_sequence(sequence: &[Option<String>]) -> Vec<Option<String>>
Expand description

Shift a sequence by removing the first element.

ยงExamples

use start_command::sequence_parser::shift_sequence;
let seq = vec![Some("screen".to_string()), Some("ssh".to_string())];
assert_eq!(shift_sequence(&seq), vec![Some("ssh".to_string())]);