Code Duplication    Length = 6-6 lines in 2 locations

src/voku/helper/UTF8.php 2 locations

@@ 5302-5307 (lines=6) @@
5299
      $haystack = self::substr($haystack, $offset);
5300
    }
5301
5302
    if (($pos = strpos($haystack, $needle)) !== false) {
5303
      $left = substr($haystack, 0, $pos);
5304
5305
      // negative offset not supported in PHP strpos(), ignoring
5306
      return ($offset > 0 ? $offset : 0) + self::strlen($left);
5307
    }
5308
5309
    return false;
5310
  }
@@ 5474-5479 (lines=6) @@
5471
      $haystack = self::substr($haystack, 0, $offset);
5472
    }
5473
5474
    if (($pos = strrpos($haystack, $needle)) !== false) {
5475
      $left = substr($haystack, 0, $pos);
5476
5477
      // negative offset not supported in PHP strpos(), ignoring
5478
      return ($offset > 0 ? $offset : 0) + self::strlen($left);
5479
    }
5480
5481
    return false;
5482
  }