Libraryless. Click here for Pure Java version (9149L/50K).
1 | sS unquote_relaxedMLS(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 | String m = s.substring(1, i); |
8 | int n = s.length(); |
9 | if (s.endsWith("]" + m + "]")) |
10 | n -= i+1; |
11 | ret s.substring(i+1, n); |
12 | } |
13 | } |
14 | ret unquoteSingleOrDoubleQuotes(s); |
15 | } |
Began life as a copy of #1001735
download show line numbers debug dex old transpilations
Travelled to 3 computer(s): elmgxqgtpvxh, mowyntqkapby, mqqgnosmbjvj
No comments. add comment
Snippet ID: | #1035509 |
Snippet name: | unquote_relaxedMLS - allow multi-line strings without proper ending |
Eternal ID of this version: | #1035509/3 |
Text MD5: | 5f26eea8c526c738d1ac345c35e9aece |
Transpilation MD5: | e507d4bae8f6bef6a0be458316d42506 |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2022-05-31 04:03:50 |
Source code size: | 408 bytes / 15 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 70 / 96 |
Version history: | 2 change(s) |
Referenced in: | [show references] |