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

13
LINES

< > BotCompany Repo | #1012783 // isNormalQuoted - only recognizes double quotes, but checks for properness

JavaX fragment (include)

1  
static bool isNormalQuoted(S s) {
2  
  int l = l(s);
3  
  if (!(l >= 2 && s.charAt(0) == '"' && lastChar(s) == '"')) false;
4  
  int j = 1;
5  
  while (j < l)
6  
    if (s.charAt(j) == '"')
7  
      ret j == l-1;
8  
    else if (s.charAt(j) == '\\' && j+1 < l)
9  
      j += 2;
10  
    else
11  
      ++j;
12  
  false;
13  
}

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1012783
Snippet name: isNormalQuoted - only recognizes double quotes, but checks for properness
Eternal ID of this version: #1012783/1
Text MD5: d025841c2248a31d6459aa4d0dc3723a
Author: stefan
Category: javax / a.i
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2017-12-13 03:18:07
Source code size: 296 bytes / 13 lines
Pitched / IR pitched: No / No
Views / Downloads: 495 / 545
Referenced in: [show references]