wood burning stoves 2.0*
The moose likes Beginning Java and the fly likes parsing comma delimited string Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "parsing comma delimited string" Watch "parsing comma delimited string" New topic
Author

parsing comma delimited string

jimbo jawgar
Greenhorn

Joined: Oct 25, 2004
Posts: 4
Hi
I there a class & method to parse a comma delimited string
Something like
SomeClass sc = new SomeClass("abc,efg,hij");
String s = sc(1,",");
System.out.println(s)

abc

Thanks


String method split(",") worked fine. Thanks alot
[ November 02, 2004: Message edited by: jimbo jawgar ]
Michael Dunn
Ranch Hand

Joined: Jun 09, 2003
Posts: 4632
StringTokenizer(), or, if you have java 1.4+, String.split()
Anand Karia
Ranch Hand

Joined: Sep 25, 2004
Posts: 156

Hope this will work out for you.



Love is GOD and GOD is Love.
Anand Karia
IT Concretor.......
M/s. Anand Karia Concreting IT
Shailesh Chandra
Ranch Hand

Joined: Aug 13, 2004
Posts: 1081

also refer to this thread
[ November 03, 2004: Message edited by: Shailesh Chandra ]

Gravitation cannot be held responsible for people falling in love ~ Albert Einstein
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: parsing comma delimited string