[65] in java-interest

home help back first fref pref prev next nref lref last post

Does java have "split"

daemon@ATHENA.MIT.EDU (Colin B. Boatwright)
Mon May 8 16:54:51 1995

Date: Mon, 8 May 1995 14:42:17 -0500
To: java-interest@java.Eng.Sun.COM
From: Colin@nando.net (Colin B. Boatwright)

I'm looking to split a string of text into an array. For example.

$a = "This is a sentence"

I want to take $a and make $b[i] where

$b[0] = "This"
$b[1] = "is"
etc.

In perl, you use @b = split(/ /,$a);

In c++ you use "strtok" (of course, you have to include string.h).

Anyone know how to do this in java?

Colin Boatwright


-------------------------------------
Colin B. Boatwright (Colin@NandO.net)
NandO Web guy


-
Note to Sun employees: this is an EXTERNAL mailing list!
Info: send 'help' to java-interest-request@java.sun.com

home help back first fref pref prev next nref lref last post