1 | static S unquoteMultiline(S s) {
|
2 | if (s == null) null; |
3 | if (startsWith(s, '[')) {
|
4 | int i = 1; |
5 | while (i < s.length() && s.charAt(i) == '=') ++i; |
6 | if (i < s.length() && s.charAt(i) == '[') {
|
7 | S m = s.substring(1, i); |
8 | if (s.endsWith("]" + m + "]"))
|
9 | ret s.substring(i+1, s.length()-i-1); |
10 | } |
11 | } |
12 | |
13 | ret s; // not multiline-quoted - return original |
14 | } |
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: | 594 / 617 |
| Referenced in: | [show references] |