Provides the 'excerptify' twig filter which truncates the provided variable's text or html to the nearest whole word based on the provided character length.
If the text that is being shortened is shorter than $characterCount already, the last word in $text is lost even though it would fit into $characterCount. You'll need to add an extra if () to NOT trim to the last space if the remaining $text is shorter than $characterCount.