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;
- For a single case-sensitive search/replace, see
Str\replace()
. - For a single case-insensitive search/replace, see
Str\replace_ci()
. - For multiple case-sensitive searches/replacements, see
Str\replace_every()
.
Parameters
string $haystack
KeyedContainer<string, string> $replacements
Returns
string