1 | static S tok_groupAroundWord(S s, S word) { |
2 | L<S> tok = defaultTok(s); |
3 | int i = indexOfIC(tok, word); |
4 | if (i < 0) ret s; |
5 | ret curlyBraceIfMoreThanOneToken(joinSubList(tok, 1, i-1)) |
6 | + joinSubList(tok, i-1, i+2) |
7 | + curlyBraceIfMoreThanOneToken(joinSubList(tok, i+2)); |
8 | } |
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: | #1012547 |
Snippet name: | tok_groupAroundWord - ignores case |
Eternal ID of this version: | #1012547/4 |
Text MD5: | 870d88ee9d287a0f30c02c39219401f1 |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2017-12-06 23:52:08 |
Source code size: | 285 bytes / 8 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 362 / 393 |
Version history: | 3 change(s) |
Referenced in: | [show references] |