Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

9
LINES

< > BotCompany Repo | #1024032 // decodeHQueryToMultiMap - decode HTML query, keeping duplicate params

JavaX fragment (include) [tags: use-pretranspiled]

Libraryless. Click here for Pure Java version (2088L/13K).

static MultiMap<S> decodeHQueryToMultiMap(S query) {
  new MultiMap<S> map;
  for (S s : splitAtAmpersand(query)) {
    int i = s.indexOf('=');
    if (i >= 0)
      map.put(urldecode(s.substring(0, i)), urldecode(s.substring(i+1)));
  }
  ret map;
}

Author comment

Began life as a copy of #1003715

download  show line numbers  debug dex  old transpilations   

Travelled to 6 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1024032
Snippet name: decodeHQueryToMultiMap - decode HTML query, keeping duplicate params
Eternal ID of this version: #1024032/1
Text MD5: 21116d45cd3b156ffd70760f3036c1a9
Transpilation MD5: 7fa9463e32eda88563bbcb091297fa0f
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2019-07-17 23:53:54
Source code size: 258 bytes / 9 lines
Pitched / IR pitched: No / No
Views / Downloads: 163 / 220
Referenced in: [show references]