Code Duplication    Length = 6-6 lines in 2 locations

src/voku/helper/UTF8.php 2 locations

@@ 5443-5448 (lines=6) @@
5440
      $haystack = self::substr($haystack, $offset);
5441
    }
5442
5443
    if (($pos = strpos($haystack, $needle)) !== false) {
5444
      $left = substr($haystack, 0, $pos);
5445
5446
      // negative offset not supported in PHP strpos(), ignoring
5447
      return ($offset > 0 ? $offset : 0) + self::strlen($left);
5448
    }
5449
5450
    return false;
5451
  }
@@ 5617-5622 (lines=6) @@
5614
      $haystack = self::substr($haystack, 0, $offset);
5615
    }
5616
5617
    if (($pos = strrpos($haystack, $needle)) !== false) {
5618
      $left = substr($haystack, 0, $pos);
5619
5620
      // negative offset not supported in PHP strpos(), ignoring
5621
      return ($offset > 0 ? $offset : 0) + self::strlen($left);
5622
    }
5623
5624
    return false;
5625
  }