sS transpile_inStringEval(S t) { t = dropPrefix("\"", dropSuffix("\"", t)); new L<S> l; int idx; while ((idx = t.indexOf("\\*")) >= 0) { int j = indexOf(t, idx, "*/"); if (j < 0) break; if (idx > 0) l.add("\"" + substring(t, 0, idx) + "\""); S code = trim(substring(t, idx+2, j)); l.add(isIdentifier(code) ? code : "(" + code + ")"); t = substring(t, j+2); } if (nempty(t)) l.add("\"" + t + "\""); ret "(" + join(" + ", l) + ")"; }
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: | #1027655 |
Snippet name: | transpile_inStringEval |
Eternal ID of this version: | #1027655/1 |
Text MD5: | 2e89f26530863ddb5b432438c96b0589 |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2020-03-29 19:48:40 |
Source code size: | 495 bytes / 17 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 175 / 211 |
Referenced in: | #1006654 - Standard functions list 2 (LIVE, continuation of #761) |