Libraryless. Click here for Pure Java version (3189L/20K).
// handles only one repeat section so far // returns pre, repeat section, post static T3S tok_parseRepeatSymbols1(LS tok) { IntRange r1 = jfind_range(tok, "||:"), r2 = jfind_range(tok, ":||"); if (r1 == null && r2 == null) null; if (r1 == null) r1 = IntRange(0, 0); if (r2 == null) r2 = IntRange(l(tok), l(tok)); ret t3(joinSubList(tok, 1, r1.start), joinSubList(tok, r1.end, r2.start), joinSubList(tok, r2.end, l(tok)-1)); }
download show line numbers debug dex old transpilations
Travelled to 7 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt, xrpafgyirdlv
No comments. add comment
Snippet ID: | #1028005 |
Snippet name: | tok_parseRepeatSymbols1 - find "||: ... :||" sections (including incomplete ones) |
Eternal ID of this version: | #1028005/2 |
Text MD5: | 357e6dac48ea3e16225134acde5d08a3 |
Transpilation MD5: | bda5db3882e5dc66752297861a0408e2 |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2020-04-27 12:49:55 |
Source code size: | 453 bytes / 11 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 187 / 274 |
Version history: | 1 change(s) |
Referenced in: | [show references] |