HH\Lib\Str\replace_every_ci

Requires the Hack Standard Library to be installed.
Facebook Engineer?

This function is available as Str\replace_every_ci() in Facebook's www repository.

Returns the "haystack" string with all occurrences of the keys of $replacements replaced by the corresponding values (case-insensitive)

namespace HH\Lib\Str;

function replace_every_ci(
  string $haystack,
  KeyedContainer<string, string> $replacements,
): string;

Parameters

Returns

  • string