Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

5
LINES

< > BotCompany Repo | #2000443 // function unquote

New Tinybrain snippet

 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;
  }

download  show line numbers   

Snippet is not live.

Travelled to 12 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt

2 comment(s) hidden. show

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: 902 / 185
Referenced in: [show references]