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

12
LINES

< > BotCompany Repo | #1028533 - intRangesToCNC

JavaX fragment (include) [tags: use-pretranspiled]

Libraryless. Click here for Pure Java version (2575L/16K).

1  
static LS intRangesToCNC(S s, L<IntRange> l) {
2  
  new LS tok;
3  
  int idx = 0;
4  
  for i over l: {
5  
    IntRange r = l.get(i);
6  
    tok.add(substring(s, idx, r.start));
7  
    tok.add(substring(s, r));
8  
    idx = r.end;
9  
  }
10  
  tok.add(substring(s, idx));
11  
  ret tok;
12  
}

Author comment

Began life as a copy of #1028530

download  show line numbers  debug dex  old transpilations   

Travelled to 6 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, xrpafgyirdlv

No comments. add comment

Snippet ID: #1028533
Snippet name: intRangesToCNC
Eternal ID of this version: #1028533/1
Text MD5: 6667793e3e89df32b9b4f63344a0d5c8
Transpilation MD5: 4ba82bba9a08ce917e67551a88d7642c
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2020-06-24 18:49:51
Source code size: 266 bytes / 12 lines
Pitched / IR pitched: No / No
Views / Downloads: 42 / 80
Referenced in: [show references]

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