🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.language
Article #8655

Can you use a String as a delimeter in StringTokenizer

#8655
From: Alex Colic
Date: Mon, 05 Mar 2001 21:30
25 lines
1433 bytes
Hi,

can  you use a String as a delimiter in StringTokenizer. Something like
this.

      String text="Category!Commodity Code";
      String strCategoryPreAppend="!";
      StringTokenizer token=new StringTokenizer(text, strCategoryPreAppend);

    while(token.hasMoreElements())
        {
         System.out.println("Token: " + token.nextElement());
        }

The above does not break the string down properly.

Any help is appreciated.



--
Regards


Alex Colic
Technical Details
Message-ID: <9810gn$fl1@bornews.inprise.com>
Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-03!supernews.com!logbridge.uoregon.edu!dispose.news.demon.net!demon!shale.ftech.net!news.ftech.net!newsfeed.icl.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!bornews.borland.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f74b3,22501d0a26c51927,start
X-Google-Attributes: gidf74b3,public
X-Google-ArrivalTime: 2001-03-05 13:46:02 PST
Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-03!supernews.com!logbridge.uoregon.edu!dispose.news.demon.net!demon!shale.ftech.net!news.ftech.net!newsfeed.icl.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!bornews.borland.com!not-for-mail
From: "Alex Colic" <alex.colic@pop-ware.com>
Newsgroups: borland.public.jbuilder.java.language
Subject: Can you use a String as a delimeter in StringTokenizer
Date: Mon, 5 Mar 2001 16:30:58 -0500
Organization: Another Netscape Collabra Server User
Lines: 27
Message-ID: <9810gn$fl1@bornews.inprise.com>
NNTP-Posting-Host: d150-29-218.home.cgocable.net
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.50.4522.1200
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200