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

8
LINES

< > BotCompany Repo | #1029916 // dropParamFromURL

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

Libraryless. Click here for Pure Java version (2857L/18K).

sS dropParamFromURL(S url, S key) {
  SS params = paramsFromURL(url);
  if (!containsKey(params, key)) ret url;
  params.remove(key);
  ret addAnchorToURL(
    appendParamsToURL(urlWithoutQueryAndAnchor(url), params),
    anchorFromURL(url));
}

download  show line numbers  debug dex  old transpilations   

Travelled to 4 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, vouqrxazstgt

No comments. add comment

Snippet ID: #1029916
Snippet name: dropParamFromURL
Eternal ID of this version: #1029916/2
Text MD5: 267d9452642dc5c9f37db21a4e29eda3
Transpilation MD5: b6856660c535a465039fb0374a9f3f0f
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2020-10-03 17:53:22
Source code size: 251 bytes / 8 lines
Pitched / IR pitched: No / No
Views / Downloads: 231 / 314
Version history: 1 change(s)
Referenced in: [show references]