Code Duplication    Length = 6-6 lines in 2 locations

src/voku/helper/UTF8.php 2 locations

@@ 5267-5272 (lines=6) @@
5264
      $haystack = self::substr($haystack, $offset);
5265
    }
5266
5267
    if (($pos = strpos($haystack, $needle)) !== false) {
5268
      $left = substr($haystack, 0, $pos);
5269
5270
      // negative offset not supported in PHP strpos(), ignoring
5271
      return ($offset > 0 ? $offset : 0) + self::strlen($left);
5272
    }
5273
5274
    return false;
5275
  }
@@ 5439-5444 (lines=6) @@
5436
      $haystack = self::substr($haystack, 0, $offset);
5437
    }
5438
5439
    if (($pos = strrpos($haystack, $needle)) !== false) {
5440
      $left = substr($haystack, 0, $pos);
5441
5442
      // negative offset not supported in PHP strpos(), ignoring
5443
      return ($offset > 0 ? $offset : 0) + self::strlen($left);
5444
    }
5445
5446
    return false;
5447
  }