Thu, 27 Nov 2008 21:23:56 +1300, Sytze de Boer wrote:
>
> Hi Folk
> Once again, I am indebted to Profox and all you folk who try to help me
> Hopefully, on elast question.
>
> How do you detect the presence of a carriage return and line feed, and
> how do you strip out.
> I think a carrigae return and line feed is the ctrl(13) and ctrl(10) factors.
> But, how do you detect, and how do you strtran them out ?
>
> Sytze
>

Hi Sytze,

Let's say lcOrigStr is your original string.

lcCleanStr = lcOrigStr
if chr( 13) $ lcCleanStr or chr( 10) $ lcCleanStr

    lcCleanStr = chrtran( lcCleanStr, chr( 13) + chr( 10), [])    &&
NB:  Empty\Null string

endif

I would prefer the following, since if chrtran() doesn't find the
CR\LF it leaves the string intact:

lcCleanStr = chrtran( lcOrigStr, chr( 13) + chr( 10), [])

Cheers,

Garry


_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/[EMAIL PROTECTED]
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to