Code Duplication    Length = 6-6 lines in 2 locations

src/voku/helper/UTF8.php 2 locations

@@ 4686-4691 (lines=6) @@
4683
      $haystack = self::substr($haystack, $offset);
4684
    }
4685
4686
    if (($pos = strpos($haystack, $needle)) !== false) {
4687
      $left = substr($haystack, 0, $pos);
4688
4689
      // negative offset not supported in PHP strpos(), ignoring
4690
      return ($offset > 0 ? $offset : 0) + self::strlen($left);
4691
    }
4692
4693
    return false;
4694
  }
@@ 4856-4861 (lines=6) @@
4853
      $haystack = self::substr($haystack, 0, $offset);
4854
    }
4855
4856
    if (($pos = strrpos($haystack, $needle)) !== false) {
4857
      $left = substr($haystack, 0, $pos);
4858
4859
      // negative offset not supported in PHP strpos(), ignoring
4860
      return ($offset > 0 ? $offset : 0) + self::strlen($left);
4861
    }
4862
4863
    return false;
4864
  }