0

I'm looking for a free library that can take two strings and produce a diff much like the diff's you see on edit revisions here on SO.

I'm hoping one exists, as this is a trivial part of an app I'm working on and I'd hate to waste time reinventing the wheel.

Any suggestions?

FlySwat
  • 160,042
  • 69
  • 241
  • 308

3 Answers3

2

I just released my DiffPlex project which does exactly what you ask.

Matthew Manela
  • 16,194
  • 3
  • 61
  • 64
1

You can do an MD5 hash of both files to determine if they are identical. The SO-style revision history would be a bit more intensive.

Check out the source code for this diff tool, which might get you going in the right direction.

http://dotnet.jku.at/applications/Diff/Src.aspx

Chris Ballance
  • 32,056
  • 25
  • 101
  • 147
1

Surprisingly, i found one implementation which could give you the same functionality as SO edits. codeproject I am going to use it as well and hope this helps other people too.

Vikram
  • 6,709
  • 8
  • 46
  • 58
  • just tested it and it works great ! i had searched for an article on this no. of times but could never find anything useful. surprisingly i found the most useful one today ! – Vikram May 04 '09 at 18:02