[Subject Prev][Subject Next][Thread Prev][Thread Next][Subject Index][Thread Index]

Re: How to detect a "blank" line.



Please show us the code you used. That would make it much easier to
understand your problem and to help you.

Matthias Pfisterer


Chien-Lung Wu wrote:
> 
> Hi,
> I try to read in a text file like follow,
> 
> # comments
> #
> line1 with information
> line2 (blank)
> line3 with information
> line4 (blank)
> # comments
> #comments
> 
> I write my program in C  and also try to use JAVA. One thing very
> interesting is my program can read-in this text file line by line (ether
> in C or in JAVA) if no any blank line. If I edit the text file with some
> blank line, I ether can not trin this line out (in C) or I get a error
> message " line out of range". How can I detect a blank line and trim it
> out?
> 
> Any suggestion will be appreciated. Thanks,
> 
> C.L.
> 
> ----------------------------------------------------------------------
> To UNSUBSCRIBE, email to java-linux-request@xxxxxxxxxxxxxxxxxx
> with a subject of "unsubscribe". Trouble? Contact listadm@xxxxxxxxxxxxxxxxxx

- --------------------------------------------------------------------
For more information on Linux in India visit http://www.linux-india.org/
Please do not post HTML email to this mailing list.  HTML mails will be
thoroughly ignored and derisively sniggered at in private.

------------------------------