static void renameToken(L<S> tok, S in, S out) { int renames = 0; for (int i = 1; i < tok.size(); i += 2) { if (tok.get(i).equals(in)) { tok.set(i, out); ++renames; } } }
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: | #1001172 |
| Snippet name: | renameToken function |
| Eternal ID of this version: | #1001172/1 |
| Text MD5: | 70ae641df0fe963d23f34fc3f797d4a5 |
| Author: | stefan |
| Category: | javax |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2015-09-25 21:32:32 |
| Source code size: | 222 bytes / 9 lines |
| Pitched / IR pitched: | No / Yes |
| Views / Downloads: | 979 / 1334 |
| Referenced in: | #1002055 - replaceToken - synonym of renameToken #1002427 - Accellerating 629 (SPIKE) #1006654 - Standard functions list 2 (LIVE, continuation of #761) #3000382 - Answer for ferdie (>> t = 1, f = 0) #3000383 - Answer for funkoverflow (>> t=1, f=0 okay) |