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

14
LINES

< > BotCompany Repo | #1008849 // ctxLoadRegexpMacros

JavaX fragment (include)

static SS ctxLoadRegexpMacros(S botID) {
  new SS out;
  File f = loadLibrary(botID);
  L<S> names = endingWithIC("/cm.pattern", listFilesInZip(f));
  for (S name : names) {
    L<S> lines = toLinesFullTrim(loadTextFileFromZip(f, name));
    for i, S s over lines: {
      int idx = s.indexOf("=");
      if (idx >= 0)
        out.put(trimSubstring(s, 0, idx), trimSubstring(s, idx+1));
    }
  }
  ret out;
}

Author comment

Began life as a copy of #1008838

download  show line numbers  debug dex  old transpilations   

Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1008849
Snippet name: ctxLoadRegexpMacros
Eternal ID of this version: #1008849/3
Text MD5: 7a3d2e72363f6faa2988c1db33d621ad
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2017-06-12 18:54:18
Source code size: 422 bytes / 14 lines
Pitched / IR pitched: No / No
Views / Downloads: 474 / 537
Version history: 2 change(s)
Referenced in: [show references]