/** * Replaces all occurrences of $search in $str by $replacement. * * @param array $search The elements to search for * @param string|array $replacement The string to replace with * @param bool $caseSensitive Whether or not to enforce case-sensitivity * * @return Stringy Object with the resulting $str after the replacements */ public function replaceAll(array $search, $replacement, $caseSensitive = true) { if ($caseSensitive) { $return = UTF8::str_replace($search, $replacement, $this->str); } else { $return = UTF8::str_ireplace($search, $replacement, $this->str); } return static::create($return); }