Re: text parser

From: Amey Samant (ameyas7_at_yahoo.com)
Date: 10/28/03


Date: 28 Oct 2003 04:37:40 -0800


> If all you want to do is split the string at each token, then use this
> feature. If you are wanting the delimiter ragged onto the end of each token,
> simply append it..

> StringTokenizer tok = new StringTokenizer("My|Token|String","|",false);
                                                               ^ (you
assume set of deleimeters to be just one character)
if you use StringTokenizer("String goes","delims") , the flag is false
by default (i think so) check docs

if you have set of delimeters with multiple characters, this would not
work.
i suggest write your own logic for parsing (if you have multiple
characters as delimeters)

regards
amey



Relevant Pages