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

7
LINES

< > BotCompany Repo | #1032761 // prependNumbering

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

Libraryless. Click here for Pure Java version (3952L/23K).

static LS prependNumbering(Cl l) {
  new LS out;
  int i = 1;
  fOr (O o : l)
    out.add(n2(i++) + ". " + o);
  ret out;
}

download  show line numbers  debug dex  old transpilations   

Travelled to 3 computer(s): bhatertpkbcr, mowyntqkapby, mqqgnosmbjvj

No comments. add comment

Snippet ID: #1032761
Snippet name: prependNumbering
Eternal ID of this version: #1032761/1
Text MD5: 2c205b9699e84603079dea844223b4f0
Transpilation MD5: 9799db2e124fd671186f374868cde9a2
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2021-10-04 16:33:39
Source code size: 129 bytes / 7 lines
Pitched / IR pitched: No / No
Views / Downloads: 127 / 192
Referenced in: #1006654 - Standard functions list 2 (LIVE, continuation of #761)