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

13
LINES

< > BotCompany Repo | #1012540 // findEndOfAngleBracketPart

JavaX fragment (include)

// i must point at the (possibly imaginary) opening bracket
// index returned is index of closing bracket + 1
static int findEndOfAngleBracketPart(List<String> cnc, int i) {
  int j = i+2, level = 1;
  while (j < cnc.size()) {
    if (eq(cnc.get(j), "<")) ++level;
    else if (eq(cnc.get(j), ">")) --level;
    if (level == 0)
      return j+1;
    ++j;
  }
  return cnc.size();
}

Author comment

Began life as a copy of #1011438

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1012540
Snippet name: findEndOfAngleBracketPart
Eternal ID of this version: #1012540/1
Text MD5: 1ab752af8273cbcd877cb467cd5e8f2b
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2017-12-06 22:57:26
Source code size: 395 bytes / 13 lines
Pitched / IR pitched: No / No
Views / Downloads: 454 / 490
Referenced in: [show references]