HH\Lib\Str\replace

This API is part of the Hack Standard Library, not HHVM itself.
Facebook Engineer?

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

Returns the "haystack" string with all occurences of $needle replaced by $replacement

Description

namespace HH\Lib\Str;

function replace(
  string $haystack,
  string $needle,
  string $replacement,
): string;

Parameters

  • string $haystack
  • string $needle
  • string $replacement