Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

StringTokenizer

 
viral trivedi
Greenhorn
Posts: 3
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a string with ";" as a delimiter. Everytime i parse this string via nextTokens of a string tokenizer it fetches the next as it says. How can i get to print every token rahter than alternate?
 
jason adam
Chicken Farmer ()
Ranch Hand
Posts: 1932
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Gonna move this guy to the Beginner's forum, since it isn't related to I/O or Streams, and would probably get answered quicker there.
 
jason adam
Chicken Farmer ()
Ranch Hand
Posts: 1932
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Oh yeah, and welcome to the Ranch Viral!
As for your question, are you trying to print the String and the token together, so something like "data;", or do you want to print "data" then ";"?
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64190
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Could we see the iteration code? (Be sure to use the UBB code tags).
bear
 
Dirk Schreckmann
Sheriff
Posts: 7023
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As Jason alluded to, and perhaps what viral is looking to discover is the StringTokenizer constructor that takes three arguments. Take a look at The StringTokenizer Class Documentation.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic