I'd like a word trim function that trims full words. For example:
I have a $sentence: "My name is James and I like XenForo"
At first, I thought {xen:helper wordtrim, $sentence, 3} would return "My name is", but it actually just returned "My...", so here I am suggesting a function to trim actual words from a sentence to a specific word count - not character count.
I have a $sentence: "My name is James and I like XenForo"
At first, I thought {xen:helper wordtrim, $sentence, 3} would return "My name is", but it actually just returned "My...", so here I am suggesting a function to trim actual words from a sentence to a specific word count - not character count.
Upvote
0