How do I add one string to another and remove a part in the middle if it's double?
I really don't know how to explain this but this is what I want to do:
Lets say
string1 = "abcde"
string2 = "cdefg"
How would I create a variable that's string1+string2 but with the "cde" part only once?
I'm looking for something like:
string3 = merge(string1, string2)
That would make string3 "abcdefg" and not "abcdecdefg"
I couldn't find it with google so that's why i'm asking here.
Any help would be greatly appreciated :)