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

12
LINES

< > BotCompany Repo | #1006353 // ocr_removeNonsenseEscapes

JavaX fragment (include)

1  
static S ocr_removeNonsenseEscapes(S s) {
2  
  new StringBuilder buf;
3  
  for i over s: {
4  
    if (s.charAt(i) == '\\' && i+1 < l(s)) {
5  
      if (!contains("[]{}_", s.charAt(i+1)))
6  
        buf.append(s.charAt(i));
7  
      ++i;
8  
    }
9  
    buf.append(s.charAt(i));
10  
  }
11  
  ret str(buf);
12  
}

Author comment

Began life as a copy of #1006262

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1006353
Snippet name: ocr_removeNonsenseEscapes
Eternal ID of this version: #1006353/1
Text MD5: 0ddf4addfd6945f44fba40e351eb6455
Author: stefan
Category: javax / ocr
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2016-12-29 01:32:18
Source code size: 286 bytes / 12 lines
Pitched / IR pitched: No / No
Views / Downloads: 503 / 527
Referenced in: [show references]