HH\Lib\Str\replace_ci

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

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

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

Description

namespace HH\Lib\Str;

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

For a case-sensitive search/replace, see Str\replace(). For multiple searches/replacements, see Str\replace_every().

Parameters

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