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

9
LINES

< > BotCompany Repo | #1012535 // tok_firstBlock

JavaX fragment (include)

static L<S> tok_firstBlock(L<S> tok) {
  int i = indexOf(tok, "{");
  if (i < 0) null;
  ret subList(tok, i-1, findEndOfBlock(tok, i));
}

static S tok_firstBlock(S s) {
  ret rejoinTok(s, tok_firstBlock(javaTok(s)));
}

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: #1012535
Snippet name: tok_firstBlock
Eternal ID of this version: #1012535/4
Text MD5: 73941f7fb763f9c046c8d1bce8294e06
Author: stefan
Category: javax / parsing
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-07-13 17:28:09
Source code size: 227 bytes / 9 lines
Pitched / IR pitched: No / No
Views / Downloads: 550 / 545
Version history: 3 change(s)
Referenced in: #1006654 - Standard functions list 2 (LIVE, continuation of #761)
#1026105 - tok_findFirstBlock