This week's book giveaway is in the Design forum.
We're giving away four copies of Design for the Mind and have Victor S. Yocco on-line!
See this thread for details.
Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Properties class

 
Tal Goldstein
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
im using the Properties class to load a configuration file.
when using getProperty(p) im getting the value for property p in the file.
but if i have several values for this property then it returns it in this format: "value1, value2, value3" (exactly as it is in the config file).

does anyone knows if there's some feature that can convert this string into a List, or an array, or something like that?

of course i can parse that string myself and seperate it but im looking for a more elegant way.

Thanks
 
Rob Spoor
Sheriff
Pie
Posts: 20511
54
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
String.split?
 
Tal Goldstein
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
exactly what i was looking for..
i was digging inside Properties, instead of just looking for what the String API has to offer..

thanks
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic