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

16
LINES

< > BotCompany Repo | #1004296 // gWants - find "[want] ..." lines

JavaX fragment (include)

static IterableIterator<S> gWants() {
  final L<S> log = gLog();
  
  ret new IterableIterator<S>() {
    int i = l(log);

    public bool hasNext() {
      while (--i >= 0 && !swic(get(log, i), "[want]"));
      ret i >= 0;
    }
    
    public S next() {
      ret dropPrefixICTrim("[want]", get(log, i));
    }
  };
}

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: #1004296
Snippet name: gWants - find "[want] ..." lines
Eternal ID of this version: #1004296/1
Text MD5: 88705ebfce1cd8715073076182baefac
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2016-08-12 22:57:29
Source code size: 336 bytes / 16 lines
Pitched / IR pitched: No / No
Views / Downloads: 489 / 484
Referenced in: [show references]