static class LineBuf {
  new StringBuffer buf;
  
  void append(String s) {
    buf.append(s);
  }
  
  String nextLine() {
    int i = buf.indexOf("\n");
    if (i >= 0) {
      String s = buf.substring(0, i > 0 && buf.charAt(i-1) == '\r' ? i-1 : i);
      buf.delete(0, i+1);
      return s;
    }
    return null;
  }
}download show line numbers debug dex old transpilations
Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, onxytkatvevr, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
| Snippet ID: | #1000947 | 
| Snippet name: | class LineBuf | 
| Eternal ID of this version: | #1000947/1 | 
| Text MD5: | 7497ff36558ef564bd9fb677a68f102c | 
| Author: | stefan | 
| Category: | javax | 
| Type: | JavaX fragment (include) | 
| Public (visible to everyone): | Yes | 
| Archived (hidden from active list): | No | 
| Created/modified: | 2015-09-11 17:15:39 | 
| Source code size: | 338 bytes / 17 lines | 
| Pitched / IR pitched: | No / Yes | 
| Views / Downloads: | 891 / 1306 | 
| Referenced in: | [show references] |