Think about Loose Coupling | |
PerlMonks |
Re: finding longest common substringby BrowserUk (Patriarch) |
on Nov 20, 2003 at 00:00 UTC ( [id://308451]=note: print w/replies, xml ) | Need Help?? |
Building on japhy's regex, this seems to work and it's fairly simple, though I haven't tested it's efficiency. It returns undef if there is no common substring. Caveat: The strings mustn't contain nulls.
Examine what is said, not who speaks.
"Efficiency is intelligent laziness." -David Dunham"Think for yourself!" - Abigail Hooray! Wanted!
In Section
Seekers of Perl Wisdom
|
|