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 a really compact way.
Another use-case is to find the diff between the strings:
org.company.project.component.diff
org.company.project.component.sub_component
I actually only want to remove the sections that are identical.