Libraryless. Click here for Pure Java version (2463L/15K).
1 | static ItIt<S> allSubstrings(S s) {
|
2 | ret nestedIterator(countIterator_inclusive(0, l(s)), length -> |
3 | mapI(countIterator_inclusive(0, length == 0 ? 1 : l(s)-length), start -> |
4 | substring(s, start, start+length))); |
5 | } |
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: | 474 / 620 |
| Version history: | 4 change(s) |
| Referenced in: | [show references] |