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).

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

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: 142 / 269
Referenced in: [show references]