Function longestComSubstring

  • EN: Computes the longest common substring of two strings.

    ZH: 计算两个字符串的最长公共子串。

    Usage:

    const ret = longestComSubstring('fish', 'finish');
    console.log(ret);

    Output:

    3
    

    Parameters

    • aStr: string

      String

    • bStr: string

      String

    Returns number

    Length