Code Duplication    Length = 6-6 lines in 2 locations

src/voku/helper/UTF8.php 2 locations

@@ 4590-4595 (lines=6) @@
4587
      $haystack = self::substr($haystack, $offset);
4588
    }
4589
4590
    if (($pos = strpos($haystack, $needle)) !== false) {
4591
      $left = substr($haystack, 0, $pos);
4592
4593
      // negative offset not supported in PHP strpos(), ignoring
4594
      return ($offset > 0 ? $offset : 0) + self::strlen($left);
4595
    }
4596
4597
    return false;
4598
  }
@@ 4793-4798 (lines=6) @@
4790
      $haystack = self::substr($haystack, 0, $offset);
4791
    }
4792
4793
    if (($pos = strrpos($haystack, $needle)) !== false) {
4794
      $left = substr($haystack, 0, $pos);
4795
4796
      // negative offset not supported in PHP strpos(), ignoring
4797
      return ($offset > 0 ? $offset : 0) + self::strlen($left);
4798
    }
4799
4800
    return false;
4801
  }