Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Inserting Line Feed at the End
Message
From
07/02/2019 12:14:01
 
 
To
07/02/2019 12:08:55
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Network:
Windows XP
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01666039
Message ID:
01666040
Views:
46
>Hello Sir, I need a Help in Inserting a Text with Line Feed at the End.
>
>My Original Line is with following Text lines
>
>"/Duplex true /Tumble false /ManualFeed false /MediaPosition 0 setpagedevice"+ Invisible LF Charater
>
>I need to replace this with
>
>"/Duplex false/PageSize [595 842] /Tumble false /ManualFeed false /MediaPosition 0 setpagedevice"+LF Character
>
>But when I am using Replace command I am Getting CRLF at the end which is causing Error. I need only LF Character at the end.
>
>Rest of the Texts in file will be as it is
>
>My code is like this
>
>
>Locate For Alltrim(POS)='%%Page: 1 1'
>IF Found()
>Skip
>IF ALLTRIM(LEFT(POS,9))="<</Duplex"
>Replace POS With '<</Duplex false/PageSize  [595 842] /Tumble false /ManualFeed false /MediaPosition 0>>  setpagedevice'
>ENDIF
>ENDIF
>
>
>Kindly tell How can i insert only LF Character at the instead of CRLF
>
>Thanks

I don't really understand your problem. I guess you are aware that LF = chr(10) while CRLF = chr(13)+chr(10)
Previous
Reply
Map
View

Click here to load this message in the networking platform