You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/** This class highlights text differences between two plain strings by generating html fragment to show changes using longest common subsequence algorithm
version 1.0, 24-11-2022, first release
version 1.1, 17-11-2023, Improved with Hirschberg algorithm to use linear amount of memory
*/
publicclassStringDiff2 {
privatestaticfinalStringINSERT_COLOR = "#00ff66";
privatestaticfinalStringDELETE_COLOR = "#ff9933";
privatestaticfinalintlcs_threshold = 1;//minimum threshold for longest common subsequence
publicstaticvoidmain(String[] args) {
Stringtext1 = "Do not change this section. Please check any misqelling! Note that this section is obsolete.";
Stringtext2 = "New section added. Do not change this section. Please check any mispelling!";