Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

String Reading

 
thippareddy mallikarjuna reddy
Greenhorn
Posts: 19
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Pals,


I have written one jsp.
I want read strings from textarea which are separated by cama.

Example : the string like this.

Airport Parking,Virus Software,Export Data,Hardware

i want stings like:
1.Airport Parking
2.Virus Software
3.Export Data
4.Hardware


Thanks
Mallikarjuna
[ June 05, 2006: Message edited by: Bear Bibeault ]
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64182
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Nothing JSP-specific about this. So moved to the Java in General (beginnner) forum.

Hint: check out the methods on the String class for methods that might help you in this.
 
vijaya vinayagam
Greenhorn
Posts: 21
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
in String class you have a split method using that split the String based upon "," and get individual Strings.
 
Kia Phia Ben
Ranch Hand
Posts: 48
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can using StringTokenizer.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic