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

3
LINES

< > BotCompany Repo | #1030619 // randomChar

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

Libraryless. Click here for Pure Java version (2771L/16K).

static char randomChar(S s) {
  ret empty(s) ? '\0' : s.charAt(random(l(s)));
}

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1030619
Snippet name: randomChar
Eternal ID of this version: #1030619/1
Text MD5: 4200fef04f19fb995f9a87492f711ca4
Transpilation MD5: 04c474d992aed3a9e0b7ef59190f36f8
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2021-01-26 11:57:09
Source code size: 81 bytes / 3 lines
Pitched / IR pitched: No / No
Views / Downloads: 209 / 296
Referenced in: #1006654 - Standard functions list 2 (LIVE, continuation of #761)