Function trim_end_matches

Source
pub const fn trim_end_matches<'a>(this: &'a str, needle: &str) -> &'a str
Expand description

A const subset of str::trim_end_matches which only takes a &str pattern.

ยงExample

use konst::string;

const TRIMMED: &str = string::trim_end_matches("oowowooooo", "oo");

assert_eq!(TRIMMED, "oowowo");