Meta Engineer?

This is available as Str\contains_ci_l in the www repository.

Returns whether the "haystack" string contains the "needle" string (case-insensitive)

namespace HH\Lib\Str;

function contains_ci_l(
  \HH\Lib\Locale\Locale $locale,
  string $haystack,
  string $needle,
  int $offset = 0,
): bool;

An optional offset determines where in the haystack the search begins. If the offset is negative, the search will begin that many characters from the end of the string. If the offset is out-of-bounds, a InvalidArgumentException will be thrown.

Locale-specific rules for case-insensitive comparisons will be used, and strings will be normalized before comparing if the locale specifies an encoding that supports multiple representations of the same characters, such as UTF-8.



  • \HH\Lib\Locale\Locale $locale
  • string $haystack
  • string $needle
  • int $offset = 0


  • bool