@technobuddha > library > String > Fuzzy Match
Function: longestCommonSubstring()
ts
function longestCommonSubstring(
string1: string,
string2: string,
__namedParameters: LongestCommonSubstringOptions): string;Defined in: longest-common-substring.ts:24
Implementation of Longest Common Substring algorithm.
Returns the longest possible substring that is substring of both of given strings.
Parameters
| Parameter | Type | Description |
|---|---|---|
string1 | string | First string. |
string2 | string | Second string. |
__namedParameters | LongestCommonSubstringOptions | - |
Returns
string
A string that is common to both strings such that there is no common substring with size greater than the length of the string.