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

22
LINES

< > BotCompany Repo | #1030419 // parseExtendedCSV_iterator

JavaX fragment (include) [tags: use-pretranspiled]

Libraryless. Click here for Pure Java version (2758L/18K).

static ItIt<LS> parseExtendedCSV_iterator(ExtendedCSVParser parser default new, S csv) {
  parser.csv = csv;
  ret iff_endOnNull(new IF0<LS>() {
    new LS currentRecord;
    bool recordComplete;
    
    {
      parser.onValueFound = v -> currentRecord.add(v);
      parser.onEndOfRecord = () -> set recordComplete;
    }
    
    public LS get() {
      while (!recordComplete)
        if (!parser.step())
          null;
      recordComplete = false;
      LS record = currentRecord;
      currentRecord = new L;
      ret record;
    }
  });
}

Author comment

Began life as a copy of #1030417

download  show line numbers  debug dex  old transpilations   

Travelled to 4 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, vouqrxazstgt

No comments. add comment

Snippet ID: #1030419
Snippet name: parseExtendedCSV_iterator
Eternal ID of this version: #1030419/6
Text MD5: 882ef43e24121c12d96a3b921e93ce04
Transpilation MD5: 1da0bab6dc28f12a7274a8cbd3c4c2b3
Author: stefan
Category: javax / parsing
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2020-12-14 16:42:57
Source code size: 568 bytes / 22 lines
Pitched / IR pitched: No / No
Views / Downloads: 208 / 293
Version history: 5 change(s)
Referenced in: #1006654 - Standard functions list 2 (LIVE, continuation of #761)