Longest common substring: Difference between revisions
Content deleted Content added
Line 988: | Line 988: | ||
<lang PowerShell>function lcs([String]$is,[String]$js) { |
<lang PowerShell>function lcs([String]$is,[String]$js) { |
||
if ([String]::IsNullOrEmpty($is) -or [String]::IsNullOrEmpty($js)) {return ""} |
|||
if ($js.Length -lt $is.Length) {$js,$is = $is,$js} |
if ($js.Length -lt $is.Length) {$js,$is = $is,$js} |
||
$iMax = $sizeMax = 0 |
$iMax = $sizeMax = 0 |