truncate_words()

public function truncate_words(array $data): string

The truncate_words() method is supported by a dedicated helper function. For guidance on how to use it, click here.