Longest common substring: Difference between revisions
m
→{{header|PowerShell}}
Line 987:
=={{header|PowerShell}}==
<lang PowerShell>function lcs([String]$
if ($
$iMax = $sizeMax
for ($k = 0; $k -lt $js.
$i,$j = 0,$k
$continue = ($i -lt $is.
while ($continue) {
while ($continue) {
if ($
++$i
++$j
$continue = ($i -lt $is.
}
$p, $size = $i, 0
while ($continue) {
if ($
++$size
++$i
++$j
$continue = ($i -lt $is.
}
if ($sizeMax -lt $size) {
Line 1,015 ⟶ 1,014:
}
}
return $
}
|