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

13
LINES

< > BotCompany Repo | #1003507 // expandDialogs (expand "=" lines)

JavaX fragment (include)

// changes the original dialogs
static L<Dialog> expandDialogs(L<Dialog> dialogs) {
  for (Dialog d : dialogs)
    for (int i = 0; i < l(d.poem); i++) {
      E e = d.poem.get(i);
      if (!e.state()) continue;
      int idx = e.text().indexOf('=');
      if (idx < 0) continue;
      d.poem.set(i, E.state("get " + e.text().substring(0, idx)));
      d.poem.add(i+1, E.state("result is " + e.text().substring(idx+1)));
    }
  ret dialogs;
}

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1003507
Snippet name: expandDialogs (expand "=" lines)
Eternal ID of this version: #1003507/1
Text MD5: 7f689e62d5fde9ba7daf593fa03c98f0
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2016-07-10 14:53:40
Source code size: 457 bytes / 13 lines
Pitched / IR pitched: No / No
Views / Downloads: 561 / 540
Referenced in: [show references]