1 | public static String unquote(String s) {
|
2 | if (s.startsWith("\"") && s.endsWith("\"") && s.length() > 1)
|
3 | return s.substring(1, s.length()-1).replace("\\\"", "\"").replace("\\n", "\n").replace("\\r", "\r").replace("\\\\", "\\"); // SHOULD work...
|
4 | return s; |
5 | } |
Snippet is not live.
Travelled to 12 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
| ID | Author/Program | Comment | Date | |
|---|---|---|---|---|
| 983 | #1000604 (pitcher) | 2015-08-20 15:28:24 | ||
| 982 | #1000610 | Edit suggestion: !636 !629 main { static Object androidContext; static String programID; public static void main(String[] args) throws Exception { public static String unquote(String s) { if (s.startsWith("\"") && s.endsWith("\"") && s.length() > 1) return s.substring(1, s.length()-1).replace("\\\"", "\"").replace("\\n", "\n").replace("\\r", "\r").replace("\\\\", "\\"); // SHOULD work... return s; } }} | 2015-08-20 10:14:07 | delete |
| Snippet ID: | #2000443 |
| Snippet name: | function unquote |
| Eternal ID of this version: | #2000443/1 |
| Text MD5: | 0f64f447c142dd94d24908e054077541 |
| Author: | stefan |
| Category: | |
| Type: | New Tinybrain snippet |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2015-07-06 18:20:37 |
| Source code size: | 276 bytes / 5 lines |
| Pitched / IR pitched: | No / Yes |
| Views / Downloads: | 1216 / 234 |
| Referenced in: | [show references] |