Help needed on Stringtokenizer

Hi,I need help on String tokenizer. Requirement is such that two continuous tokens should not be considered as one.For Example if my string is "a||b" with pipe "|" as token then I should first get "a" then a blank string "" and then "b".Thanks,PAWAN
[284 byte] By [Pawana] at [2007-10-2 6:10:29]
# 1
Don't use a Tokenizer; it's too cumbersome. Have a look at the String.split()method instead.kind regards,Jos
JosAHa at 2007-7-16 13:11:07 > top of Java-index,Java Essentials,Java Programming...
# 2
String s = "a||b";String[] strings = s.split("\\|");System.out.print(strings.length);Tokenizer will be deprecated.
CeciNEstPasUnProgrammeura at 2007-7-16 13:11:07 > top of Java-index,Java Essentials,Java Programming...
# 3
Hi.....split() method is not supported in ver 1.3....I need some way of doing it using 1.3 APIPAWAN
Pawana at 2007-7-16 13:11:07 > top of Java-index,Java Essentials,Java Programming...
# 4
> Hi.....split() method is not supported in ver> 1.3....I need some way of doing it using 1.3 APIDo it yourself? Your rules are so simple, all it takes is a few lines.
CeciNEstPasUnProgrammeura at 2007-7-16 13:11:07 > top of Java-index,Java Essentials,Java Programming...
# 5
Here is my tokenizer that will support this:[url http://www.discoverteenergy.com/files/SimpleTokenizer.java]SimpleTokenizer[/url]
camickra at 2007-7-16 13:11:07 > top of Java-index,Java Essentials,Java Programming...