static S unquoteMultiline(S s) { if (s == null) null; if (startsWith(s, '[')) { int i = 1; while (i < s.length() && s.charAt(i) == '=') ++i; if (i < s.length() && s.charAt(i) == '[') { S m = s.substring(1, i); if (s.endsWith("]" + m + "]")) ret s.substring(i+1, s.length()-i-1); } } ret s; // not multiline-quoted - return original }
Began life as a copy of #1001735
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: | #1012919 |
| Snippet name: | unquoteMultiline - unquote a multiline string literal |
| Eternal ID of this version: | #1012919/1 |
| Text MD5: | 17a7f6a1459d37f5c94db1ee84c17120 |
| Author: | stefan |
| Category: | javax |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2017-12-17 16:38:33 |
| Source code size: | 393 bytes / 14 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 596 / 619 |
| Referenced in: | #1006654 - Standard functions list 2 (LIVE, continuation of #761) |