Compares two strings, character by character, and returns the first position where the two strings differ from one another.

Namespace: Lucene.Net.Util
Assembly: Lucene.Net (in Lucene.Net.dll) Version: 2.9.4.1

Syntax

C#
public static int StringDifference(
	string s1,
	string s2
)
Visual Basic
Public Shared Function StringDifference ( _
	s1 As String, _
	s2 As String _
) As Integer
Visual C++
public:
static int StringDifference(
	String^ s1, 
	String^ s2
)

Parameters

s1
Type: System..::..String
The first string to compare
s2
Type: System..::..String
The second string to compare

Return Value

The first position where the two strings differ.

See Also