StringAlgorithmsCharactersInOrder Method
Note: This API is now obsolete.
Checks if the characters of one of the strings occur in order
in the other string. Returns the number of characters in the two strings
that match in order. The value will be between 0 and the size of the
smallest string.
The following strings match, since the one fully contains the other in order
CharactersInOrder("BLUB","aBcLeUgBh") = 4
CharactersInOrder("aBcLeUgBh","BLUB") = 4
The following strings differ by one, since the final B is missing in the long string
CharactersInOrder("BLUB","aBcLeUg") = 3
CharactersInOrder("aBcLeUg","BLUB") = 3
Namespace: DHI.Mike1D.GenericAssembly: DHI.Mike1D.Generic (in DHI.Mike1D.Generic.dll) Version: 24.0.0.0 (11.1.1.1111)
[ObsoleteAttribute("Use LongestCommonSubsequence")]
public static int CharactersInOrder(
string s1,
string s2
)
- s1 String
- String to search for
- s2 String
- String to search in
Int320 if full match, > 0 for partial match