check-ends-macro 1.0.0

A couple of macros to simulate match with starts and ends of a string.
Documentation
check-ends-macro-1.0.0 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"
};

if let Some(value) = opt {
    println!("{}", value);
}