longest_common_substring 函数
返回两个字符串共有的最长连续子串。
语法
LongestCommonSubString(text1, text2)longest_common_substring(text1, text2)
参数与选项
text1 | 第一个文本。 |
|---|---|
text2 | 第二个文本。 |
示例
- 最长公共子串
LongestCommonSubString('abracadabra', 'cadet')返回 cad。
返回两个字符串共有的最长连续子串。
LongestCommonSubString(text1, text2)longest_common_substring(text1, text2)text1 | 第一个文本。 |
|---|---|
text2 | 第二个文本。 |
LongestCommonSubString('abracadabra', 'cadet')返回 cad。