Reputation: 81
I want to use DiffPlex library to find the difference between 2 strings. I've tried Google Diff Match Patch but the result is a it difficult to parse and requires me to look at characters at a time. I got it working but was wondering if it could be done easier.
However, DiffPlex seems to be able to do it by word or even phrases if the string has a specific separator between each phrase. I was able to call the function but don't know how to parse the result. Is there a way to see what was inserted and deleted from the result? This is what I have so far:
List<char> seperators = new List<char>() { '||' };
Differ differ = new Differ();
DiffResult diffResult = differ.CreateWordDiffs(string1, string2, true, seperators.ToArray());
Thank you in advance!
Upvotes: 4
Views: 1570