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

12
LINES

< > BotCompany Repo | #1011499 // ai_dropDroppablePrefix - only does one step

JavaX fragment (include)

static S ai_dropDroppablePrefix(S s) {
  for (WebNode node : ai_search_dollarX_verified("$X", "is", "a droppable prefix")) {
    if (isQuoted(web_text(node))) {
      S tail = web_unquote(node);
      if (nempty(tail) && swic(s, tail)) {
        print("Dropping prefix: " + quote(tail));
        ret trim(substring(s, l(tail)));
      }
    }
  }
  ret s;
}

Author comment

Began life as a copy of #1011497

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: #1011499
Snippet name: ai_dropDroppablePrefix - only does one step
Eternal ID of this version: #1011499/2
Text MD5: 1ae778081e46f4a0dbbcbff55da4325c
Author: stefan
Category: javax / a.i.
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-01-12 10:07:44
Source code size: 368 bytes / 12 lines
Pitched / IR pitched: No / No
Views / Downloads: 520 / 547
Version history: 1 change(s)
Referenced in: #1006654 - Standard functions list 2 (LIVE, continuation of #761)