Longest common suffix: Difference between revisions
m
→{{header|Perl}}: small simplification
Not a robot (talk | contribs) m (→{{header|C++}}: fix typo) |
SqrtNegInf (talk | contribs) m (→{{header|Perl}}: small simplification) |
||
Line 1,616:
sub lcs {
for (0..$#_) { $_[$_] =
join '', reverse split '', (join("\0", @_) =~ /^ ([^\0]*) [^\0]* (?:\0 \1 [^\0]*)* $/sx)[0];
}
|