Code Duplication    Length = 6-6 lines in 2 locations

src/voku/helper/UTF8.php 2 locations

@@ 4730-4735 (lines=6) @@
4727
      $haystack = self::substr($haystack, $offset);
4728
    }
4729
4730
    if (($pos = strpos($haystack, $needle)) !== false) {
4731
      $left = substr($haystack, 0, $pos);
4732
4733
      // negative offset not supported in PHP strpos(), ignoring
4734
      return ($offset > 0 ? $offset : 0) + self::strlen($left);
4735
    }
4736
4737
    return false;
4738
  }
@@ 4900-4905 (lines=6) @@
4897
      $haystack = self::substr($haystack, 0, $offset);
4898
    }
4899
4900
    if (($pos = strrpos($haystack, $needle)) !== false) {
4901
      $left = substr($haystack, 0, $pos);
4902
4903
      // negative offset not supported in PHP strpos(), ignoring
4904
      return ($offset > 0 ? $offset : 0) + self::strlen($left);
4905
    }
4906
4907
    return false;
4908
  }