Code Duplication    Length = 6-6 lines in 2 locations

src/voku/helper/UTF8.php 2 locations

@@ 4475-4480 (lines=6) @@
4472
      $haystack = self::substr($haystack, $offset);
4473
    }
4474
4475
    if (($pos = strpos($haystack, $needle)) !== false) {
4476
      $left = substr($haystack, 0, $pos);
4477
4478
      // negative offset not supported in PHP strpos(), ignoring
4479
      return ($offset > 0 ? $offset : 0) + self::strlen($left);
4480
    }
4481
4482
    return false;
4483
  }
@@ 4677-4682 (lines=6) @@
4674
      $haystack = self::substr($haystack, 0, $offset);
4675
    }
4676
4677
    if (($pos = strrpos($haystack, $needle)) !== false) {
4678
      $left = substr($haystack, 0, $pos);
4679
4680
      // negative offset not supported in PHP strpos(), ignoring
4681
      return ($offset > 0 ? $offset : 0) + self::strlen($left);
4682
    }
4683
4684
    return false;
4685
  }