Code Duplication    Length = 6-6 lines in 2 locations

src/voku/helper/UTF8.php 2 locations

@@ 5158-5163 (lines=6) @@
5155
      $haystack = self::substr($haystack, $offset);
5156
    }
5157
5158
    if (($pos = strpos($haystack, $needle)) !== false) {
5159
      $left = substr($haystack, 0, $pos);
5160
5161
      // negative offset not supported in PHP strpos(), ignoring
5162
      return ($offset > 0 ? $offset : 0) + self::strlen($left);
5163
    }
5164
5165
    return false;
5166
  }
@@ 5328-5333 (lines=6) @@
5325
      $haystack = self::substr($haystack, 0, $offset);
5326
    }
5327
5328
    if (($pos = strrpos($haystack, $needle)) !== false) {
5329
      $left = substr($haystack, 0, $pos);
5330
5331
      // negative offset not supported in PHP strpos(), ignoring
5332
      return ($offset > 0 ? $offset : 0) + self::strlen($left);
5333
    }
5334
5335
    return false;
5336
  }