Comparing two strings and returning the differences.

  • Thread starter Thread starter Rob Panosh
  • Start date Start date
R

Rob Panosh

Hello,

I am looking for a routine that would compare the following:

sTest1 = "This is a test"
sTest2 = "This is a long test"

and return the differences between the two:

long

Thanks,
Rob Panosh
 
Rob Panosh said:
I am looking for a routine that would compare the following:

sTest1 = "This is a test"
sTest2 = "This is a long test"

and return the differences between the two:

long


"This is test a test"
"This is a test a"

What is the difference between these? What I intend to say is that the logic
behind is not easy to implement. Maybe somebody else has got a link for you.
 
Hi Rob,

You mean this

Dim stringLenghtDifference = sTest1.length - sTest2.length

Or do you mean something else?

Cor

"> I am looking for a routine that would compare the following:
 
Herfried,
Speaking of WinDiff.

I want a "nicer" WinDiff, something like the Diff out of Visual Source Safe,
that functions as an Add-In to VS.NET.

The C source to WinDiff can installed with VS.NET. I was playing with that a
couple months ago, it is very C. Which means that it is not easily ported to
C++, C#, much less VB.NET.

Just a thought
Jay
 
Herfried,
I seem to remember that it was included with the Win 3.1 SDK (16-bit). I
don't remember when the source first showed up.

Jay
 
yes ..., and like Visual Source Safe shows the differences between to files.

I want to be able to call a routine in my source so I can display the
differences.

Rob
 
yes ..., and like Visual Source Safe shows the differences between to
files.

When I use differences in Visual Source Safe, only the text lines that are
different are identified. Am I missing an option setting that will identify
the different content within a specific line?
 
Back
Top