• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Knute Snortum
  • Paul Clapham
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Frits Walraven
Bartenders:
  • Ganesh Patekar
  • Tim Holloway
  • salvin francis

how can i count the blank lines in a text file using stream tokenizer?  RSS feed

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi guys I'm parsing a text file using a stream tokenizer that contains

1011111111111 1011111111111
1011111111111 1011111111111
1011111111111 1011111111111
1011111111111 1011111111111
1011111111111 1011111111111
<---how can i count these blank line
1011111111111 1011111111111
1011111111111 1011111111111
1011111111111 1011111111111
1011111111111 1011111111111
1011111111111 1011111111111
<---how can i count these blank line
1011111111111 1011111111111
1011111111111 1011111111111
1011111111111 1011111111111
1011111111111 1011111111111
1011111111111 1011111111111

i need to output the ff: based on the text file
this should be the correct
rows: 5 <--- im having a problem with this value???
cols: 13 <-- created a method already using st.sval.length()
panel cols: 2 <-- created a method by counting the tokens per line
panel rows 3 <-- im having a problem with this value???





here is the code





thanks !
 
He baked a muffin that stole my car! And this tiny ad:
how do I do my own kindle-like thing - without amazon
https://coderanch.com/t/711421/engineering/kindle-amazon
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!