pub fn trim_suffix<'a>(suffix: &'a str, root: &'a str) -> &'a str {
	match root.rfind(suffix) {
		Some(i) => &root[..i],
		None => root,
	}
}
// Trim a substring (suffix) from the end of a string.
Trim a substring (suffix) from the end of a string.
Trim a substring ( suffix ) from the end of a string .
pub fn trim_suffix<'a>(suffix: &'a str, root: &'a str) -> &'a str {
	match root.rfind(suffix) {
		Some(i) => &root[..i],
		None => root,
	}
}
pub fn trim_suffix < ' a > ( suffix : & ' a str , root : & ' a str ) -> & ' a str { match root . rfind ( suffix ) { Some ( i ) => & root [ .. i ] , None => root , } }
Trim a substring (suffix) from the end of a string.
Trim a substring ( suffix ) from the end of a string .
suffix
&'a str
root
&'a str
suffix
&'a str
root
&'a str