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

9
LINES

< > BotCompany Repo | #1012535 // tok_firstBlock

JavaX fragment (include)

1  
static L<S> tok_firstBlock(L<S> tok) {
2  
  int i = indexOf(tok, "{");
3  
  if (i < 0) null;
4  
  ret subList(tok, i-1, findEndOfBlock(tok, i));
5  
}
6  
7  
static S tok_firstBlock(S s) {
8  
  ret rejoinTok(s, tok_firstBlock(javaTok(s)));
9  
}

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: 549 / 545
Version history: 3 change(s)
Referenced in: [show references]