function search()

in src/str/utf8/introspect.php [43:52]


function search(string $haystack, string $needle, int $offset = 0)[rx_local]: ?int {
  $offset = _Private\validate_offset($offset, length($haystack));
  /* HH_FIXME[2049] __PHPStdLib */
  /* HH_FIXME[4107] __PHPStdLib */
  $position = \mb_strpos($haystack, $needle, $offset, Encoding::UTF8);
  if ($position === false) {
    return null;
  }
  return $position;
}