highlight() public static method

Highlight a phrase within a string
public static highlight ( string $strString, string $strPhrase, string $strOpeningTag = '<strong>', string $strClosingTag = '</strong>' ) : string
$strString string The string
$strPhrase string The phrase to highlight
$strOpeningTag string The opening tag (defaults to )
$strClosingTag string The closing tag (defaults to )
return string The highlighted string
 /**
  * Highlight a phrase within a string.
  *
  * @param string $strString     The string.
  *
  * @param string $strPhrase     The phrase to highlight.
  *
  * @param string $strOpeningTag The opening tag (defaults to <strong>).
  *
  * @param string $strClosingTag The closing tag (defaults to </strong>).
  *
  * @return string The highlighted string
  */
 public static function highlight($strString, $strPhrase, $strOpeningTag = '<strong>', $strClosingTag = '</strong>')
 {
     if (self::isStringUtilAvailable()) {
         return StringUtil::highlight($strString, $strPhrase, $strOpeningTag, $strClosingTag);
     }
     return \Contao\String::highlight($strString, $strPhrase, $strOpeningTag, $strClosingTag);
 }