If you are using Java or JavaScript, is there a good way to do something like a String subtraction so that given two strings:
org.company.project.component
org.company.project.component.sub_component
you just get
sub_component
I know that I could just write code to walk the string comparing characters, but I was hoping there was a way to do it in really compact way.
EDIT TO ADD: As I was analyzing the data I get when I use this I realized that I missed the statement of the case a bit. It should be:
org.company.project.component.diff
org.company.project.component.sub_component
So, I actually only want to remove the sections that are identical. That said, the answer that I accepted is closest to my goal.