Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Best way to strip out trailing blanks/CR/LFs from a stri
Message
 
 
To
19/07/2004 11:09:22
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00925773
Message ID:
00925776
Views:
18
In VFP9 you could use RTRIM() function
cString = RTRIM(cString,0, SPACE(1), CHR(10), CHR(13))
* or 
cString = RTRIM(cString, SPACE(1), CHR(10), CHR(13))
>
>What is the best/fastest way to remove trailing carriage returns/line feeds from a string?
>
>Example:
>
>cString = "This is what I want to keep!"                         + ;
>          Space (10) + Chr (13) + Chr (10) + Chr (13) + Chr (10) + ;
>          Space ( 1) + Chr (13) + Chr (10) + ;
>          Space ( 1)
>
>After execution of the routine, all trailing blanks/CR/LFs should be removed (last 18 characters removed, first 28 characters ketp).
>
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform