I would like to highlight and report out text differences between 2 Strings with Java . What is a good way to do this? Do I need to tokenize both Strings and do a compare or is there an easier way?
Example:
I have 2 Strings like so:
Previous String : CLIMB TO 5900' then climbing RIGHT turn to 11000' on heading 193 and outbound Current String : CLIMB TO 6500' then climbing LEFT turn to 11000'on heading 201 and inbound
I am currently just displaying the previous and current strings by doing a String compare, but what i want is to highlight the actual substring that did change from the previous string, like so:
Current String : CLIMB TO 6500' then climbing LEFT turn to 11000'on heading 201 and inbound
Appreciate your help!
Thank you praveen