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

8
LINES

< > BotCompany Repo | #1003279 // function quoteCharacter

JavaX fragment (include)

1  
static S quoteCharacter(char c) {
2  
  if (c == '\'') ret "'\\''";
3  
  if (c == '\\') ret "'\\\\'";
4  
  if (c == '\r') ret "'\\r'";
5  
  if (c == '\n') ret "'\\n'";
6  
  if (c == '\t') ret "'\\t'";
7  
  ret "'" + c + "'";
8  
}

Author comment

Began life as a copy of #1001239

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1003279
Snippet name: function quoteCharacter
Eternal ID of this version: #1003279/3
Text MD5: a86c309ee4d8a7732ebb2e942ef15dea
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2017-05-20 12:37:24
Source code size: 216 bytes / 8 lines
Pitched / IR pitched: No / No
Views / Downloads: 708 / 2115
Version history: 2 change(s)
Referenced in: [show references]