Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Is there a String.split for JDK 1.3

Status
Not open for further replies.

Einstein47

Programmer
Joined
Nov 29, 2001
Messages
737
Location
US
I'm using IBM's WebSphere 4.05 which uses the Java JDK 1.3 API. I really need something like String.split() that exists in JDK 1.4. Is there a way to use it, or will I be forced to create my own split method?

Any comments or suggestions appreciated.

Einstein47
("Tribulations are God's megaphone to awaken a deaf world." - C.S. Lewis)
 
if you aren't able to use jdk1.4, then yes, you will have to implement your own. (The java.util.regex package also came about in 1.4, so that wouldn't help you either.)<br><br>However, it's rather simple to do, using String.substring() and String.indexOf(). <p>Liam Morley<br><A HREF="mailto:"></A><br>&quot;light the deep, and bring silence to the world.<br>light the world, and bring depth to the silence.&quot;
 
Or use a java.util.StringTokenizer
 
I did come up with my own solution - just a 3 liner using a For loop. Not pretty, but it will get the job done.

Thanks again.

Einstein47
(&quot;Tribulations are God's megaphone to awaken a deaf world.&quot; - C.S. Lewis)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top