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

11
LINES

< > BotCompany Repo | #1033412 // extractLibsFromTranspilation

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

Libraryless. Click here for Pure Java version (4571L/25K).

1  
static Pair<S, LS> extractLibsFromTranspilation(S transpiledSrc) {
2  
  if (transpiledSrc == null) transpiledSrc = "";
3  
  int i = transpiledSrc.indexOf('\n');
4  
  S dehlibs = substring(transpiledSrc, 0, i);
5  
  transpiledSrc = transpiledSrc.substring(i+1);
6  
  new L<S> libs;
7  
  Matcher matcher = Pattern.compile("\\d+").matcher(dehlibs);
8  
  while (matcher.find())
9  
    libs.add(fsI(matcher.group()));
10  
  ret pair(transpiledSrc, libs);
11  
}

Author comment

Began life as a copy of #1011367

download  show line numbers  debug dex  old transpilations   

Travelled to 3 computer(s): bhatertpkbcr, mowyntqkapby, mqqgnosmbjvj

No comments. add comment

Snippet ID: #1033412
Snippet name: extractLibsFromTranspilation
Eternal ID of this version: #1033412/1
Text MD5: 703faad12adaa2adb2585ea619d6fc21
Transpilation MD5: 0cf0170b5354057b9ff0673ad9bb4080
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2021-10-27 06:11:40
Source code size: 433 bytes / 11 lines
Pitched / IR pitched: No / No
Views / Downloads: 87 / 157
Referenced in: [show references]