Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Remove empty lines
Message
From
18/09/2010 01:36:48
 
 
To
18/09/2010 01:21:15
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01481722
Message ID:
01481726
Views:
62
lcErg = ""
for lnRun to alines(laLines, FileToStr(...))
    If !Empty(laLines[m.lnRun])
       lcErg = m.lcErg + laLines[m.lnRun]
    endif
next
StrToFile(...)
not optimized for large files/many lines, just a one-shot...
If you need it in production, test writing directly into file instead of
concatenating a string. Works even if there are spaces/tabs in those "Empty" lines...


HTH

thomas
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform