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

15
LINES

< > BotCompany Repo | #1000381 // L<S> (translator)

JavaX translator [tags: use-pretranspiled]

Libraryless. Click here for Pure Java version (1624L/10K).

!636
!quicktranslator
!class JavaTok

// replace L<S> with List<String>
// and L<X> with List<X>
List<String> tok = JavaTok.split(s);
for (int i = 1; i+6 < tok.size(); i += 2)
  if (tok.get(i).equals("L") && tok.get(i+2).equals("<")
    && tok.get(i+6).equals(">")) {
    tok.set(i, "List");
    if (tok.get(i+4).equals("S"))
      tok.set(i+4, "String");
  }
s = JavaTok.join(tok);

Author comment

Began life as a copy of #680

download  show line numbers  debug dex  old transpilations   

Travelled to 16 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, jtubtzbbkimh, lpdgvwnxivlt, mqqgnosmbjvj, onxytkatvevr, pyentgdyhuwx, pzhvpgtvlbxg, teubizvjbppd, tslmcundralx, tvejysmllsmz, vouqrxazstgt

2 comment(s) hidden. show

Snippet ID: #1000381
Snippet name: L<S> (translator)
Eternal ID of this version: #1000381/1
Text MD5: af233246334612410d9c7b4bef318d04
Transpilation MD5: 6369fa4c60098e0a363c7abd7003406e
Author: stefan
Category: javax
Type: JavaX translator
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2015-07-31 08:48:50
Source code size: 396 bytes / 15 lines
Pitched / IR pitched: No / Yes
Views / Downloads: 1380 / 1698
Referenced in: [show references]