Code Duplication    Length = 6-6 lines in 2 locations

src/voku/helper/UTF8.php 2 locations

@@ 5148-5153 (lines=6) @@
5145
      $haystack = self::substr($haystack, $offset);
5146
    }
5147
5148
    if (($pos = strpos($haystack, $needle)) !== false) {
5149
      $left = substr($haystack, 0, $pos);
5150
5151
      // negative offset not supported in PHP strpos(), ignoring
5152
      return ($offset > 0 ? $offset : 0) + self::strlen($left);
5153
    }
5154
5155
    return false;
5156
  }
@@ 5318-5323 (lines=6) @@
5315
      $haystack = self::substr($haystack, 0, $offset);
5316
    }
5317
5318
    if (($pos = strrpos($haystack, $needle)) !== false) {
5319
      $left = substr($haystack, 0, $pos);
5320
5321
      // negative offset not supported in PHP strpos(), ignoring
5322
      return ($offset > 0 ? $offset : 0) + self::strlen($left);
5323
    }
5324
5325
    return false;
5326
  }