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

1  
sS pb_extendScriptFromDB(S input) {
2  
  new Set<virtual Script> scriptsAdded;
3  
  LS newText = ll(input);
4  
  while licensed {
5  
    bool change;
6  
    new LS newText2;
7  
    for (virtual Script s : pb_scriptsForKeywords(joinWithEmptyLines(newText)))
8  
      if (scriptsAdded.add(s)) {
9  
        newText2.add(getString text(s));
10  
        set change;
11  
      }
12  
    newText = newText2;
13  
    if (!change) break;
14  
  }
15  
  ret joinWithEmptyLines(itemPlusList(input, collect text(scriptsAdded)));
16  
}

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: 195 / 281
Version history: 1 change(s)
Referenced in: [show references]