Module lib::assert_ends_with::assert_ends_with

source ·
Expand description

Assert an expression (such as a string) ends with an expression (such as a string).

Pseudocode:
a.ends_with(b)

§Example

use assertables::*;

// String ends with substring?
let whole: &str = "alfa";
let part: &str = "fa";
assert_ends_with!(sequence, x);

// Vector ends with element?
let whole = vec![1, 2, 3];
let part = [3];
assert_ends_with!(sequence, x);

§Module macros