/** * Censor a single word or an array of words within a string. * * @param string $strString The string to censor. * * @param mixed $varWords A string or array or words to replace. * * @param string $strReplace An optional replacement string. * * @return string The cleaned string */ public static function censor($strString, $varWords, $strReplace = '') { if (self::isStringUtilAvailable()) { return StringUtil::censor($strString, $varWords, $strReplace); } return \Contao\String::censor($strString, $varWords, $strReplace); }