Files: Deleting and check empty lines
First can you delete an empty line?
Code:
Code:
Second, how do you check for an emtpy line? |
Short answer: You can't.
Long answer: You can, using Stream module, or the raw data mode of the new writing functions. Checking for an empty line is as easy as simply checking to see if it equals "" |
Quote:
|
NO GREENBERET, BACK IN YOUR CAGE!
If you use the read_file native, its just "". If you use the others, it is ^n. |
read_file yes
other method is "^n" or "^r^n" depends on the programm who created the file. eg. the standart text editor from MS is using "^r^n" btw. i dont like the cage |
Yeah,t hats why we shove you in it. So you don't ask for more natives. XD
|
Quote:
|
Or you could read a file write the lines you want to a temp file then delete the first file and rename the temp to the correct name
|
Ohayo Renji-san! :D
That is a horrible horrible way to do it ^^ *flicks fan* |
I never ever said it was efficient.
Possibly make a native for this? |
| All times are GMT -4. The time now is 16:33. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.