| | |
Combining tokens?
Please support our Java advertiser: Programming Forums - DaniWeb Sister Site
![]() |
•
•
Join Date: Oct 2009
Posts: 10
Reputation:
Solved Threads: 0
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
[code]
StringTokenizer pepTokenizer = new StringTokenizer(inputString,"RK",true);
while (pepTokenizer.hasMoreTokens()){
String Ion = pepTokenizer.nextToken();
[icode]
Many Thanks
![]() |
Similar Threads
- Split a string to tokens, and store tokens in structs (C++)
- Comparing Stringtokenizer Tokens (Java)
- Another question about tokens (Java)
- Still problem with tokens (Java)
- Storing Tokens Into Array (C)
- Nested tokens (VB.NET)
- Reading Tokens (Java)
- save the tokens into array (Java)
Other Threads in the Java Forum
- Previous Thread: Need JAVA help!!
- Next Thread: threads
| Thread Tools | Search this Thread |
Tag cloud for Java
addressbook android api apple applet application arguments array arrays automation awt binary bluetooth button calculator chat class classes client code columns component converter database draw eclipse error errors event exception file fractal ftp game givemetehcodez graphics gridlayout gui helpwithhomework html ide image inetaddress input integer invokingapacheantprogrammatically j2me java javaprojects jme jmf jni jpanel julia link linux list loop map method methods midlethttpconnection mobile netbeans newbie number object objects openjavafx oracle php print problem program programming project projects recursion rim scanner screen server set signing size smart sms socket sort sql storm string support swing test threads time tree webservices windows





