aspose file tools
The moose likes Beginning Java and the fly likes parsing comma delimited string Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Beginning Java
Reply 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: 154
Hope this will work out for you.



Love is GOD and GOD is Love.<br /> <br />Anand Karia<br />Manager I.T<br />Artistic Garment Ind. Pvt. Ltd<br />MSC (Computer Science)
Shailesh Chandra
Ranch Hand

Joined: Aug 13, 2004
Posts: 1076

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
 
jQuery in Action, 2nd edition
 
subject: parsing comma delimited string
 
Similar Threads
Reading a text file
Instance variable vs method argument
need help in connection performance...
constructor are playing with each other ...
Referencing a public variable...