[
https://issues.apache.org/jira/browse/LANG-680?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13068858#comment-13068858
]
Henri Yandell commented on LANG-680:
------------------------------------
Digging into this, the easy API would be:
public static CharSequence lcs(CharSequence, CharSequence)
That returns one of the longest common substrings; either the first or last
found.
Variants would be to return CharSequence[], ie) all of them; and to implement
this for N strings. Leading us to:
public static CharSequence[] lcs(CharSequence...)
> StringUtils - Longest Common Substring / Longest common susequence
> ------------------------------------------------------------------
>
> Key: LANG-680
> URL: https://issues.apache.org/jira/browse/LANG-680
> Project: Commons Lang
> Issue Type: New Feature
> Components: lang.*
> Reporter: Andrea Vacondio
> Labels: LCS,, Longest, common, substring
> Fix For: 3.x
>
>
> I recently needed to perform Longest commons substring on a collection of
> filenames and I think it could be usefull to have it in StringUtils (I
> couldn't find any discussion about it).
> Some detail here
> http://en.wikipedia.org/wiki/Longest_common_substring
> and here
> http://en.wikipedia.org/wiki/Longest_common_subsequence_problem
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira