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

8
LINES

< > BotCompany Repo | #1003279 - function quoteCharacter

JavaX fragment (include)

static S quoteCharacter(char c) {
  if (c == '\'') ret "'\\''";
  if (c == '\\') ret "'\\\\'";
  if (c == '\r') ret "'\\r'";
  if (c == '\n') ret "'\\n'";
  if (c == '\t') ret "'\\t'";
  ret "'" + c + "'";
}

Author comment

Began life as a copy of #1001239

download  show line numbers  debug dex   

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

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: 440 / 1822
Version history: 2 change(s)
Referenced in: [show references]

Formerly at http://tinybrain.de/1003279 & http://1003279.tinybrain.de