• Post Reply Bookmark Topic Watch Topic
  • New Topic

Convert a query string from one format to another  RSS feed

 
Chaitanya Rach
Greenhorn
Posts: 12
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I want to write a java program to convert string from one format to another. Basically my string contains query conditions and I want to convert that to another format.

Here is the String:



I want to convert this to:




I tried using replace function in String class but realized that it is not possible with that. Please help me in how to convert this.
 
Campbell Ritchie
Marshal
Posts: 56529
172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try parsing the String by splitting it on the commas and colons.
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!