Libraryless. Click here for Pure Java version (2255L/14K).
sS randomNGram(int n, S s) { if (l(s) < n) null; int i = random(l(s)-n+1); ret substring(s, i, i+n); }
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: | #1027462 |
| Snippet name: | randomNGram |
| Eternal ID of this version: | #1027462/1 |
| Text MD5: | d7edc9d77349270e960422f8ecd3efaa |
| Transpilation MD5: | 4c503e2453ddb08e20303cbd1127405b |
| Author: | stefan |
| Category: | |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2020-03-22 13:05:01 |
| Source code size: | 112 bytes / 5 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 402 / 530 |
| Referenced in: | #1006654 - Standard functions list 2 (LIVE, continuation of #761) |