NetTalk Central
NetTalk Web Server => Web Server - Ask For Help => Topic started by: Niels Larsen on March 24, 2014, 01:17:52 PM
-
Hi
Best way?
REgards Niels
-
Hi Niels,
Not sure if this is what you are asking, but ..
When I have text that has '<13,10>' in it, and I need to make it "html-nice", I use a StringTheory object to do the search and replace.
IE
st.Replace('<13,10>','<br/>',,,,,1) !* the "1" being for the Recursive parameter *
-
Br does no occur inside <13,10> hence recursion is not required. Stu, you are confusing recursion with just repeating -which is only limited by the count, start and end parameters.
-
Nice tool :-)
Thanks
-
My apologies Bruce.
It should read:
st.Replace('<13,10>','<br/>',st.Count('<13,10>'))
-
Hi Stu,
According to the docs at
http://www.capesoft.com/docs/StringTheory/StringTheory.htm#stReplace
the count parameter is optional.
so
st.Replace('<13,10>','<br/>',st.Count('<13,10>'))
becomes
st.Replace('<13,10>','<br/>')
which kinda just does what it says on the tin - replaces <13,10> with <br/>
Cheers
Bruce
-
Doh.
Just logged on here to say that I just discovered this, but you beat me to the punch.
I'm still living back when I thought you needed to specific how many times you had to replace.
New thing learned again because you told me this last year some time.
-
yeah well, you know Australians.... and props... so imagine what it's like dealing with an
ex-prop who's also Australian?
-
Hey! Take that back!
NEVER AN "EX" PROP!