Lack of interest A word trim function

This suggestion has been closed automatically because it did not receive enough votes over an extended period of time. If you wish to see this, please search for an open suggestion and, if you don't find any, post a new one.

James

Well-known member
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.
 
Upvote 0
This suggestion has been closed. Votes are no longer accepted.
Any particular reason you want words rather than characters? It's mostly done with characters for space reasons. The amount of space X words can use is highly variable (more so than general character use in Western languages).
 
Character-based limits are good for the space reasons (obviously), I just find word limits to seem logical. You might want to show the first X words of (for example) an article, rather than the first X characters.

Where space is precious (i.e. thread previews) I agree to the character limits, but I'm sure some add-ons would make use of a word-based trim function.
 
Top Bottom