/**
  * Shorten a HTML string to a given number of characters.
  *
  * The function preserves words, so the result might be a bit shorter or
  * longer than the number of characters given. It preserves allowed tags.
  *
  * @param string  $strString        The string to shorten.
  * @param integer $intNumberOfChars The target number of characters.
  *
  * @return string The shortened HTML string
  */
 public static function substrHtml($strString, $intNumberOfChars)
 {
     if (self::isStringUtilAvailable()) {
         return StringUtil::substrHtml($strString, $intNumberOfChars);
     }
     return \Contao\String::substrHtml($strString, $intNumberOfChars);
 }