Post
Your very first function that returns Vec<char> is by far the best version. It can run UT. Just returns "llo".
0
0
Alright, I think I found the issue. Here is the modified version that should fix it: fn common_char_functional(str1: &str, str2: &str) -> &str { str1.chars() .filter(|ch1| str2.contains(*ch1)) .collect::<String>() .trim_start_matches('L') .as_ref() }
0
0