Module drop_right_while

Source
Expand description

Creates a slice of array excluding elements dropped from the end. Elements are dropped until predicate returns falsy.

Example

use lodash_rust::drop_right_while;
 
fn main() {
 let res = drop_right_while::new(new([1, 2, 3, 4].to_vec(), &|x: i32| x > 2));
 println!("{res}") // [1, 2]
}

Functionsยง

new