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

14
LINES

< > BotCompany Repo | #1016407 // platformParseArgs

JavaX fragment (include)

static L<S> platformParseArgs(S s) {
  new L<S> out;
  L<S> tok = javaTok(trim(s)); // TODO: better tokenizer
  for (int i = 1; i < l(tok); i += 2) {
    if (isQuoted(tok.get(i)))
      continue with out.add(tok.get(i));
    int j = i;
    while (j+2 < l(tok) && empty(tok.get(j+1)))
      j += 2;
    out.add(joinSubList(tok, i, j+1));
    i = j;
  }
  ret out;
}

download  show line numbers  debug dex  old transpilations   

Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1016407
Snippet name: platformParseArgs
Eternal ID of this version: #1016407/2
Text MD5: 0c53d9cdd77495b4ba75fa49a1935c11
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-06-17 14:09:35
Source code size: 377 bytes / 14 lines
Pitched / IR pitched: No / No
Views / Downloads: 285 / 329
Version history: 1 change(s)
Referenced in: [show references]