I would like to know if there is any way to compare 2 Strings in Java in such a way that they search not if they are equal, but if they do have equal parts and concatenate them without repeating the common parts.
Example:
Dice Strings as: conf onfi nfid
The program returns me: confid
Thanks in advance.