Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Chr()
Message
From
28/08/2012 09:03:08
 
 
To
28/08/2012 08:43:18
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Re: Chr()
Miscellaneous
Thread ID:
01551485
Message ID:
01551685
Views:
59
>>>>>Is CHR(13) a carriage return?
>>>>
>>>>Yes. Also, CHR( 10 ) is a line feed.
>>>>
>>>>Depending on exactly what you're doing, you may need to use either just CR ( CHR( 13 ) ) or CRLF ( CHR( 13 ) + CHR( 10 ) ) to start a new line.
>>>
>>>I am trying to discover a way to remove (Carriage Returns/Enters) from captured web page text to tighten it up and make it more pleasant looking.
>>
>>Aloha my old man :)
>>Stripping out chr(13) / Chr(10) is easy ;
>>
>>
>>cText=StrTran(cText,chr(13),'')
>>cText=StrTran(cText,chr(10),'')
>>
>>
>>however you might end up with funny looking results afterwards.
>>I use this for EDI files, but you can't apply this safely on some text for instance. You get flat line text.
>>Might work for HTML but chk results first.
>>
>>HTH
>>Sergio
>
>Thank you, young fellow. I've been playing with StrTran() and shall continue on that path.

In this case I would prefer chrtran(), since you can do it all in only one line of code.
Previous
Reply
Map
View

Click here to load this message in the networking platform