Jump to content

Delete blank lines within Files / _ArrayPop update issue


 Share

Recommended Posts

Hi all,

my problem is that I will catch some .ini files and each line in the files ends up with an CR+LF. (This ensures that the Delimiter will work line by line]

This as has result that the the combined .ini file has all entries (e.g. 3 entries but 4 lines, or 10 entries but 11 lines and the last line is always empty).

When I do a _FileReadToArray the last array field will be EMPTY.

When I run the _ArrayPop to remove this entry -> the entry is gone. so far so good.

BUT the stupid Index $Array[0] is not updated with the new value ;) (eg. Index before 4 should be now 3 but it remains with 4)

This will kill the whole programm.

So I am looking for one of 2 possible solutions.

1. Get rid of the last line before it goes to the array

OR

2. _ArrayPop and then UPDATE the stupid Index

For both ways I was looking for a solution but can not find.

Any ideas (or alternate solutions)?

Suggestions extremley welcome :P

Thanks in advance

mslabrat :D

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...