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)

1  
static IterableIterator<S> gWants() {
2  
  final L<S> log = gLog();
3  
  
4  
  ret new IterableIterator<S>() {
5  
    int i = l(log);
6  
7  
    public bool hasNext() {
8  
      while (--i >= 0 && !swic(get(log, i), "[want]"));
9  
      ret i >= 0;
10  
    }
11  
    
12  
    public S next() {
13  
      ret dropPrefixICTrim("[want]", get(log, i));
14  
    }
15  
  };
16  
}

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: 589 / 562
Referenced in: [show references]