Gene Sullivan > String-LCSS-1.00 > String::LCSS

Download:
String-LCSS-1.00.tar.gz

Dependencies

Annotate this POD

CPAN RT

New  1
Open  1
View/Report Bugs
Module Version: 1.00   Source  

NAME ^

String::LCSS - Find The Longest Common Substring of Two Strings.

VERSION ^

This document refers to String::LCSS version 1.00.

SYNOPSIS ^

    use String::LCSS;
    my $longest = lcss( "zyzxx", "abczyzefg" );
    print $longest, "\n";

    my @result = lcss( "zyzxx", "abczyzefg" );
    print "$result[0] ($result[1],$result[2])\n";

DESCRIPTION ^

String::LCSS provides the function lcss to ferret out the longest common substring shared by two strings passed as arguments.

SUBROUTINES ^

lcss($string1, $string2)

undef is returned if the susbstring length is one char or less.

In scalar context, returns the substring.

When used in an array context, lcss will return the indexi of the match root in the two args.

EXPORT ^

The lcss function is exported by default.

BUGS ^

There are no known bugs in this module.

SEE ALSO ^

String::LCSS_XS is not pure Perl, but it was created to be faster.

COPYRIGHT ^

This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See perlartistic.

AUTHOR ^

The original author is Daniel Yacob (CPAN ID: DYACOB).

Gene Sullivan (gsullivan@cpan.org) is a co-maintainer.

ACKNOWLEDGEMENTS ^

Code provided by BrowserUk from PerlMonks.

syntax highlighting: