Code Duplication    Length = 6-6 lines in 2 locations

src/voku/helper/UTF8.php 2 locations

@@ 5448-5453 (lines=6) @@
5445
      $haystack = self::substr($haystack, $offset);
5446
    }
5447
5448
    if (($pos = strpos($haystack, $needle)) !== false) {
5449
      $left = substr($haystack, 0, $pos);
5450
5451
      // negative offset not supported in PHP strpos(), ignoring
5452
      return ($offset > 0 ? $offset : 0) + self::strlen($left);
5453
    }
5454
5455
    return false;
5456
  }
@@ 5622-5627 (lines=6) @@
5619
      $haystack = self::substr($haystack, 0, $offset);
5620
    }
5621
5622
    if (($pos = strrpos($haystack, $needle)) !== false) {
5623
      $left = substr($haystack, 0, $pos);
5624
5625
      // negative offset not supported in PHP strpos(), ignoring
5626
      return ($offset > 0 ? $offset : 0) + self::strlen($left);
5627
    }
5628
5629
    return false;
5630
  }