Combining tokens?

Please support our Java advertiser: Programming Forums - DaniWeb Sister Site
Reply

Join Date: Oct 2009
Posts: 10
Reputation: skiplatte is an unknown quantity at this point 
Solved Threads: 0
skiplatte skiplatte is offline Offline
Newbie Poster

Combining tokens?

 
0
  #1
Oct 29th, 2009
Hi, I have used Tokenizer to split a user input string into tokens and retained the delimiters (R and K). Is there any way to combine each delimiter with it's preceding token to create a result string? eg change tokens FGADA and R into one string FGADAR which I can pass on to another method.

[code]
StringTokenizer pepTokenizer = new StringTokenizer(inputString,"RK",true);

while (pepTokenizer.hasMoreTokens()){

String Ion = pepTokenizer.nextToken();
[icode]

Many Thanks
Reply With Quote Quick reply to this message  
Reply

Message:


Thread Tools Search this Thread



Tag cloud for Java
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC