HH\Lib\Str\replace_ci

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

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

Returns the "haystack" string with all occurrences of $needle replaced by $replacement (case-insensitive)

namespace HH\Lib\Str;

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

Parameters

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

Returns

  • string