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

16
LINES

< > BotCompany Repo | #1027333 // pb_extendScriptFromDB

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

Libraryless. Click here for Pure Java version (3091L/19K).

sS pb_extendScriptFromDB(S input) {
  new Set<virtual Script> scriptsAdded;
  LS newText = ll(input);
  while licensed {
    bool change;
    new LS newText2;
    for (virtual Script s : pb_scriptsForKeywords(joinWithEmptyLines(newText)))
      if (scriptsAdded.add(s)) {
        newText2.add(getString text(s));
        set change;
      }
    newText = newText2;
    if (!change) break;
  }
  ret joinWithEmptyLines(itemPlusList(input, collect text(scriptsAdded)));
}

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1027333
Snippet name: pb_extendScriptFromDB
Eternal ID of this version: #1027333/2
Text MD5: 22bdac9ebc724fb0837033db40a69410
Transpilation MD5: 964e119696f8e4756157ec8b3587478d
Author: stefan
Category: javax / a.i.
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2020-03-06 13:43:11
Source code size: 484 bytes / 16 lines
Pitched / IR pitched: No / No
Views / Downloads: 194 / 280
Version history: 1 change(s)
Referenced in: #1006654 - Standard functions list 2 (LIVE, continuation of #761)