StringAlgorithms Class |
Namespace: DHI.Mike1D.Generic
The StringAlgorithms type exposes the following members.
Name | Description | |
---|---|---|
CharactersInOrder | 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.
Examples
The following strings match, since the one fully contains the other in order
CharactersInOrder("BLUB","aBcLeUgBh") = 4 CharactersInOrder("aBcLeUgBh","BLUB") = 4 CharactersInOrder("BLUB","aBcLeUg") = 3 CharactersInOrder("aBcLeUg","BLUB") = 3 | |
Count |
Count the number of occurances of c in the string source.
| |
JoinQuoted(Char, Char, IEnumerableString) |
Concatenates the members of a collection, using the specified separator between each member, and surrounding each non-null member by the specified quote char.
| |
JoinQuoted(StringBuilder, Char, Char, IEnumerableString) |
Concatenates the members of a collection, using the specified separator between each member, and surrounding each non-null member by the specified quote char,
appending to StringBuilder
| |
LevenshteinDistance |
Calculate the Levenshtein distance between two strings, i.e.
the minimum number of edits in order to make the two strings equal
| |
LevenshteinDistanceRef |
Calculate the Levenshtein distance between two strings, i.e.
the minimum number of edits in order to make the two strings equal
Reference implementation that stores the entire distance matrix | |
LongestCommonSubsequence |
Calculate the Longest Common Subsequence.
It differs from problems of finding common substrings: unlike substrings, subsequences are not required to occupy consecutive positions within the original sequences. Examples
The following strings match, since the one fully contains the other in order
LongestCommonSubsequence("BLUB","aBcLeUgBh") = 4 LongestCommonSubsequence("aBcLeUgBh","BLUB") = 4 LongestCommonSubsequence("BLUB","aBcLeUg") = 3 LongestCommonSubsequence("aBcLeUg","BLUB") = 3 | |
SplitQuoted |
Method to split a string that may contain quote characters for substrings.
|