🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: [QES] existing method to cut a string into its words ?

#15330
From: Jonathan
Date: Fri, 25 Jun 1999 00:00
30 lines
1311 bytes
you could also do the following to also recognize commas etc. as separators
between words

String temp ="this is a string, but has commas";

StringTokenizer st = new StringTokenizer(temp," ,;.\n");
 while (st.hasMoreTokens())
    System.out.println(st.nextToken());


Carole Masset wrote in message <7kvfct$edj12@forums.borland.com>...
> StringTokenizer st = new StringTokenizer("this is a test");
>     while (st.hasMoreTokens())
> System.out.println(st.nextToken());     }
>
>Frantz Thiessard wrote in message <7kvbag$edv14@forums.borland.com>...
>>Hi !
>>
>>I've got a beginner question :-)
>>
>>Do you know a method that can cut a string into its words ?
>>
>>thanks
>>
>>
>>reply to : frantz.thiessard@free.fr
>>
>>
>
>
Technical Details
Message-ID: <7kvm7m$f3r4@forums.borland.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <7kvbag$edv14@forums.borland.com> <7kvfct$edj12@forums.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f74b3,8d76308379963e54
X-Google-Attributes: gidf74b3,public
From: "Jonathan" <plaskowj@logica.com>
Subject: Re: [QES] existing method to cut a string into its words ?
Date: 1999/06/25
Message-ID: <7kvm7m$f3r4@forums.borland.com>
X-Deja-AN: 493722037
References: <7kvbag$edv14@forums.borland.com> <7kvfct$edj12@forums.borland.com>
Organization: Another Netscape Collabra Server User
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3
Newsgroups: borland.public.jbuilder.java.language