You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Henri Yandell (JIRA)" <ji...@apache.org> on 2011/07/21 10:32:58 UTC

[jira] [Commented] (LANG-680) StringUtils - Longest Common Substring / Longest common susequence

    [ 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