Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the equivalent to parse_str in java [duplicate]

Possible Duplicate:
Parsing query strings in Java

PHP has parse_str(), is there an equivalent function that does the same thing in java?

like image 895
Lumpy Avatar asked Jul 28 '26 19:07

Lumpy


1 Answers

PHPs parse_str has two modes of operation:

  1. If given a single argument, parse_str will set parameters as variables in the current scope. For this mode of operation, there is no equivalent in Java.
  2. If given two arguments, the second argument must be an array which will be populated with the query string parameters/values. For an equivalent in Java, see this answer on parsing query strings in Java.
like image 75
Håvard S Avatar answered Jul 30 '26 07:07

Håvard S



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!