Code Duplication    Length = 6-6 lines in 2 locations

src/voku/helper/UTF8.php 2 locations

@@ 3404-3409 (lines=6) @@
3401
      $haystack = self::substr($haystack, $offset);
3402
    }
3403
3404
    if (($pos = strpos($haystack, $needle)) !== false) {
3405
      $left = substr($haystack, 0, $pos);
3406
3407
      // negative offset not supported in PHP strpos(), ignoring
3408
      return ($offset > 0 ? $offset : 0) + self::strlen($left);
3409
    }
3410
3411
    return false;
3412
  }
@@ 5594-5599 (lines=6) @@
5591
      $haystack = self::substr($haystack, 0, $offset);
5592
    }
5593
5594
    if (($pos = strrpos($haystack, $needle)) !== false) {
5595
      $left = substr($haystack, 0, $pos);
5596
5597
      // negative offset not supported in PHP strpos(), ignoring
5598
      return ($offset > 0 ? $offset : 0) + self::strlen($left);
5599
    }
5600
5601
    return false;
5602
  }