check-ends-macro 1.0.2

A couple of macros to simulate match with starts and ends of a string.
Documentation
check-ends-macro-1.0.2 has been yanked.

Use

It's like a match, but it returns an Option

let to_match = "hello world";

let opt = match_start! {to_match,
    "hello" | "something" => "something else"
    "world" | "another" => "another thing"
};

if let Some(value) = opt {
    println!("{}", value); // Will print "something else"
}