aspose file tools
The moose likes Java in General and the fly likes StringTokenizer Blues Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Java » Java in General
Reply locked New topic
Author

StringTokenizer Blues

Swati Singhal
Ranch Hand

Joined: Dec 08, 2003
Posts: 31
Hi,

I have a String in which there are 5 tokens taht are delimited by tabs ("\t"). I was using the StringTokenizer to parse this line and get individual tokens.
It worked fine, till I encountered a situation where there were 2 tabs (instead of 1).
Now, since StringTokenizer doesn't return me an empty string, how can I find out if there is a consecutive occurrence of that token. I know that the 3rd constructore of String Tokenizer has a boolean argument that can be set true, but it doesn't seem to be doing god to me!!

Please help ASAP!!
David O'Meara
Rancher

Joined: Mar 06, 2001
Posts: 13459

You also posted the same question here. I'm going to ask foir this copy to be closed and direct anyone who wants to help should so the other thread.

Swats, please pay particular attention to the display name warnings.

Dave.
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: StringTokenizer Blues
 
Similar Threads
retrieve the particular element -- StringTokenizer
Converting String to an array.
StringTokenizer Issue
StringTokenizer cannot split String with tabs?
Reading a tab delimited txt file and replacing blanks with zeores.