// i = first C token, j = last C token static LS tok_addCurlyBracketsAroundPart(LS tok, int i, int j) { if (i == 1 && j == l(tok)-2) ret tok; S pre = get(tok, i-1), post = get(tok, j+1); if (endsWith(pre, "{") && startsWith(post, "}")) ret tok; tokPrepend(tok, i, "{"); tokAppend(tok, j, "}"); ret tok; }
Began life as a copy of #1021553
download show line numbers debug dex old transpilations
Travelled to 7 computer(s): bhatertpkbcr, cfunsshuasjs, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1022271 |
Snippet name: | tok_addCurlyBracketsAroundPart - modifies tok |
Eternal ID of this version: | #1022271/5 |
Text MD5: | 913fe585ed996d927d25d83dd3b10c1d |
Author: | stefan |
Category: | javax / a.i. |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2019-03-12 13:47:12 |
Source code size: | 329 bytes / 10 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 280 / 310 |
Version history: | 4 change(s) |
Referenced in: | #1006654 - Standard functions list 2 (LIVE, continuation of #761) |