pub fn array_unshift<T>(array: &mut Vec<T>, value: T)
Expand description
Prepend one element to the beginning of an vector
§Description
array_unshift() prepends passed element to the front of the vector.
§Examples
Example #1 array_shift() example
use phpify::array::array_unshift;
let mut queue = vec!["orange", "banana"];
array_unshift(&mut queue, "apple");
assert_eq!(queue, vec!["apple", "orange", "banana"]);