Code Duplication    Length = 6-6 lines in 2 locations

src/voku/helper/UTF8.php 2 locations

@@ 5461-5466 (lines=6) @@
5458
      $haystack = self::substr($haystack, $offset);
5459
    }
5460
5461
    if (($pos = strpos($haystack, $needle)) !== false) {
5462
      $left = substr($haystack, 0, $pos);
5463
5464
      // negative offset not supported in PHP strpos(), ignoring
5465
      return ($offset > 0 ? $offset : 0) + self::strlen($left);
5466
    }
5467
5468
    return false;
5469
  }
@@ 5676-5681 (lines=6) @@
5673
      $haystack = self::substr($haystack, 0, $offset);
5674
    }
5675
5676
    if (($pos = strrpos($haystack, $needle)) !== false) {
5677
      $left = substr($haystack, 0, $pos);
5678
5679
      // negative offset not supported in PHP strpos(), ignoring
5680
      return ($offset > 0 ? $offset : 0) + self::strlen($left);
5681
    }
5682
5683
    return false;
5684
  }