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


< > BotCompany Repo | #1027033 - stringChunks

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

Libraryless. Click here for Pure Java version (2161L/14K).

static LS stringChunks(S s, int chunkSize) {
  int rows = intRatio_ceil(l(s), chunkSize);
  LS out = emptyList(rows);
  for y to rows:
    out.add(substring(s, y*chunkSize, (y+1)*chunkSize));
  ret out;

Author comment

Began life as a copy of #1020680

download  show line numbers  debug dex   

Travelled to 5 computer(s): bhatertpkbcr, mqqgnosmbjvj, pzhvpgtvlbxg, tvejysmllsmz, xrpafgyirdlv

No comments. add comment

Snippet ID: #1027033
Snippet name: stringChunks
Eternal ID of this version: #1027033/2
Text MD5: c95d5afb79942383a5f0d7d25e5365ec
Transpilation MD5: 17567803f089fe620910e9b3470989c4
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2020-02-11 19:21:08
Source code size: 210 bytes / 7 lines
Pitched / IR pitched: No / No
Views / Downloads: 33 / 70
Version history: 1 change(s)
Referenced in: [show references]

Formerly at &