Some functions on this portal require JavaScript but your browser does not support it or it has been disabled.
Skip to main content
Wednesday 14 December 2005 9:42:05 am - 5 replies
Ole Morten Halvorsen
Wednesday 14 December 2005 11:23:01 am
Did you try the <b>trim()</b> operator?
http://ez.no/doc/ez_publish/technical_manual/3_6/reference/template_operators/strings/trim
Senior Software Engineer - Vision with Technology http://www.visionwt.com http://www.omh.cc http://www.twitter.com/omh eZ Certified Developer http://ez.no/certification/verify/358441 http://ez.no/certification/verify/272578
Wednesday 14 December 2005 2:25:05 pm
My bad. Didn't see you wanted to remove newline characters from the middle of the string :)
I think you would have to make your own operator that does the removal for you.
Lydie Soler
Thursday 15 December 2005 12:50:36 am
hi!
yes I have tried the trim operator and as you noticed my problem is with removing caracters in the middle of the string.
ok lets try to create my own... But how do I do this?... where do I have to put my new code....
where can I find the code of the trim operator in order to have an example?
thanks again!!!
Thursday 15 December 2005 1:55:01 am
Well I have search.. and I have found an extension that does exactl what I needed: str_replace.
so here is the code that works for my needs:
{set $corps=ezstr_replace("\r","",$corps)} {set $corps=ezstr_replace("\n","<br/>",$corps)}
Thursday 15 December 2005 4:12:24 am
That's great.
Didn't know there was a string replace operator available as a contribution :)
You must be logged in to post messages in this topic!