File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Servlets and the fly likes Alternative to StringTokenizer Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Servlets
Reply Bookmark "Alternative to StringTokenizer " Watch "Alternative to StringTokenizer " New topic
Author

Alternative to StringTokenizer

Bhushan Shete
Greenhorn

Joined: Mar 20, 2001
Posts: 9
Is there any alternative ( other than substring ) that can be used instead of StringTokenizer ???
Actually, I am facing a problem with StringTokenizer. If I have a string with a character '=' in it, then the following code results in false tokens :
StringTokenizer valToken = new StringTokenizer(val,"==>");
while(valToken.hasMoreTokens())
{
valno = valToken.nextToken();
valdate= valToken.nextToken();
}

Frank Carver
Sheriff

Joined: Jan 07, 1999
Posts: 6913
This is not really a servlets and JSP question, so I've moved it to Java in General (intermediate)


A Convergent Visionary ~ Frank's Punchbarrel Blog ~ LinkedIn profile
 
 
subject: Alternative to StringTokenizer
 
Threads others viewed
please clarify this.
Reading from String
Alternative to StringTokenizer
StringTokenizer Question?
Alternative to StringTokenizer
MyEclipse, The Clear Choice

cast iron skillet 49er

more from paul wheaton's glorious empire of web junk: cast iron skillet diatomaceous earth rocket mass heater sepp holzer raised garden beds raising chickens lawn care CFL flea control missoula heat permaculture