I have two multiline strings (in memory, not from files). How can I calculate a unified diff?
One solution would be to save the strings to temporary files, do a system call to diff -u
and capture the output, but I'd rather do this in pure .NET. Happy to use NuGet package if it's not in standard library.