HH\Lib\Str\replace_every

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

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

Returns the "haystack" string with all occurrences of the keys of $replacements replaced by the corresponding values

namespace HH\Lib\Str;

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

Parameters

Returns

  • string