utilitees

- Addons for ExpressionEngine 1.6.x

Trimmer

Version Released Type License
1.1.1 2009-08-14 Plugins Freeware (?)

Trimmer Documentation
Docs

Download  Trimmer
Download

Permalink Trimmer
Permalink

Trimmer Version RSS
Version RSS

All this little plugin does is removing characters from the beginning and / or end of a given text and returning the trimmed string.

It can either remove a fixed number of characters (useful in places where you’d need the backspace-parameter but it isn’t available) or cut the text at positions defined by a given string.


What does Freeware mean?
Freeware means you may use this addon free of
charge in as many installations as you like.


Comments

Peter Ripley:
2010-07-13 14:25

Thanks, this is handy.  Using this plugin to rewrite stored paths for our new mobile site.

I do notice that “start_after” does not handle slashes as expected.

Example:

{exp:trimmer start_after=”/entry/”}sometemplategroup/entry/some_entry_id{/exp:trimmer}

would be expected to return:

some_entry_id

but in my testing actually returns:

sometemplategroup/entry/some_entry_id

In our case using the start_after value of “entry” gives an acceptable result. We will only regret this compromise on the day that someone creates a template group that contains the string “entry”.

grin

Thanks for your work!