Code Duplication    Length = 6-6 lines in 2 locations

src/voku/helper/UTF8.php 2 locations

@@ 5428-5433 (lines=6) @@
5425
      $haystack = self::substr($haystack, $offset);
5426
    }
5427
5428
    if (($pos = strpos($haystack, $needle)) !== false) {
5429
      $left = substr($haystack, 0, $pos);
5430
5431
      // negative offset not supported in PHP strpos(), ignoring
5432
      return ($offset > 0 ? $offset : 0) + self::strlen($left);
5433
    }
5434
5435
    return false;
5436
  }
@@ 5602-5607 (lines=6) @@
5599
      $haystack = self::substr($haystack, 0, $offset);
5600
    }
5601
5602
    if (($pos = strrpos($haystack, $needle)) !== false) {
5603
      $left = substr($haystack, 0, $pos);
5604
5605
      // negative offset not supported in PHP strpos(), ignoring
5606
      return ($offset > 0 ? $offset : 0) + self::strlen($left);
5607
    }
5608
5609
    return false;
5610
  }