I need to build a function in C, that receives two strings str1 and str2 and returns a string that is the concatenation str1 and str2, but I need to discard the last elements of str1 that are equal to the first elements of str2.
Example 1:
str1 = ccabcc
str2 = ccbabd
result : ccabccbabd
Example 2:
str1 = abbcbf
str2 = ab
Result : abbcbfab
Sometimes there is no overlapping.