Function strsplit::until_char
source · pub fn until_char<'s>(s: &'s str, c: char) -> &'s strExpand description
Returns the string before the first instance of the delimiter is found E.g
let haystack = "hello";
let trimmed = until_char(&haystack, 'o');
assert_eq!(trimmed, "hell");