Libraryless. Click here for Pure Java version (9149L/50K).
sS unquote_relaxedMLS(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) == '[') { String m = s.substring(1, i); int n = s.length(); if (s.endsWith("]" + m + "]")) n -= i+1; ret s.substring(i+1, n); } } ret unquoteSingleOrDoubleQuotes(s); }
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: | 667 / 803 |
| Version history: | 2 change(s) |
| Referenced in: | #1006654 - Standard functions list 2 (LIVE, continuation of #761) |