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

5
LINES

< > BotCompany Repo | #1026836 // allSubstrings (iterator)

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

Libraryless. Click here for Pure Java version (2463L/15K).

static ItIt<S> allSubstrings(S s) {
  ret nestedIterator(countIterator_inclusive(0, l(s)), length ->
    mapI(countIterator_inclusive(0, length == 0 ? 1 : l(s)-length), start ->
      substring(s, start, start+length)));
}

download  show line numbers  debug dex  old transpilations   

Travelled to 7 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt, xrpafgyirdlv

No comments. add comment

Snippet ID: #1026836
Snippet name: allSubstrings (iterator)
Eternal ID of this version: #1026836/5
Text MD5: 48549e604ee2a28e91a20ed7c3040062
Transpilation MD5: 08cb3dd4ca73d051177b39779e867c90
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2020-01-26 14:40:37
Source code size: 226 bytes / 5 lines
Pitched / IR pitched: No / No
Views / Downloads: 169 / 259
Version history: 4 change(s)
Referenced in: [show references]