@@ 670-683 (lines=14) @@ | ||
667 | } |
|
668 | if ($from_segment_len >= $to_segment_len) { |
|
669 | $copy_len = $to_segment_len; |
|
670 | while ($copy_len) { |
|
671 | $to_copy_start = $to_segment_start; |
|
672 | $to_copy_start_max = $to_segment_end - $copy_len; |
|
673 | while ($to_copy_start <= $to_copy_start_max) { |
|
674 | $from_copy_start = strpos(substr($from_text, $from_segment_start, $from_segment_len), |
|
675 | substr($to_text, $to_copy_start, $copy_len)); |
|
676 | if ($from_copy_start !== false) { |
|
677 | $from_copy_start += $from_segment_start; |
|
678 | break 2; |
|
679 | } |
|
680 | $to_copy_start++; |
|
681 | } |
|
682 | $copy_len--; |
|
683 | } |
|
684 | } else { |
|
685 | $copy_len = $from_segment_len; |
|
686 | while ($copy_len) { |
|
@@ 686-699 (lines=14) @@ | ||
683 | } |
|
684 | } else { |
|
685 | $copy_len = $from_segment_len; |
|
686 | while ($copy_len) { |
|
687 | $from_copy_start = $from_segment_start; |
|
688 | $from_copy_start_max = $from_segment_end - $copy_len; |
|
689 | while ($from_copy_start <= $from_copy_start_max) { |
|
690 | $to_copy_start = strpos(substr($to_text, $to_segment_start, $to_segment_len), |
|
691 | substr($from_text, $from_copy_start, $copy_len)); |
|
692 | if ($to_copy_start !== false) { |
|
693 | $to_copy_start += $to_segment_start; |
|
694 | break 2; |
|
695 | } |
|
696 | $from_copy_start++; |
|
697 | } |
|
698 | $copy_len--; |
|
699 | } |
|
700 | } |
|
701 | // match found |
|
702 | if ($copy_len) { |