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

8
LINES

< > BotCompany Repo | #1023602 // agiBlue_urlRewrite_rightToLeft [takes URL without protocol]

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

Libraryless. Click here for Pure Java version (2480L/16K).

sS agiBlue_urlRewrite_rightToLeft(S s) {
  int iSlash = indexOfAny(s, "/?");
  if (charAt(s, iSlash) != '/') ret s;
  int iStart = iSlash+1;
  int iEnd = smartIndexOf(s, iStart, '?');
  if (iEnd <= iStart) ret s;
  ret makeAGIBlueDomain(urldecode(substring(s, iStart, iEnd)));
}

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1023602
Snippet name: agiBlue_urlRewrite_rightToLeft [takes URL without protocol]
Eternal ID of this version: #1023602/3
Text MD5: 99af2ee930202e1b2b564c82e2106d6a
Transpilation MD5: 0a40b40ab3d42821c2cdd008da182196
Author: stefan
Category: javax / a.i.
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2019-06-29 18:53:18
Source code size: 285 bytes / 8 lines
Pitched / IR pitched: No / No
Views / Downloads: 263 / 370
Version history: 2 change(s)
Referenced in: [show references]