// i must point at the opening bracket ("<") // index returned is index of closing bracket + 1 static int findEndOfTypeArgs(L<S> cnc, int i) { int j = i+2, level = 1; while (j < cnc.size()) { if (cnc.get(j).equals("<")) ++level; else if (cnc.get(j).equals(">")) --level; if (level == 0) return j+1; ++j; } return cnc.size(); }
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: | #1001160 |
Snippet name: | findEndOfTypeArgs |
Eternal ID of this version: | #1001160/3 |
Text MD5: | 9c5d13d5323a1039d5959bda309fed3c |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2018-07-14 02:29:26 |
Source code size: | 370 bytes / 13 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 754 / 1210 |
Version history: | 2 change(s) |
Referenced in: | [show references] |