create a twig function to truncate a string or an array of strings
closes #16