sS shortenToMaxLinesAndChars(S s, int maxLines, int maxChars) { s = shorten(s, maxChars); LS lines = lines(s); if (l(lines) <= maxLines) ret s; ret lines(takeFirst(maxLines, lines)) + "..."; }
download show line numbers debug dex old transpilations
Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt
No comments. add comment
| Snippet ID: | #1018064 |
| Snippet name: | shortenToMaxLinesAndChars - actually uses one more line for the ... |
| Eternal ID of this version: | #1018064/2 |
| Text MD5: | 95d7d85b03f9498c4751dda75578c2aa |
| Author: | stefan |
| Category: | javax |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2018-08-29 12:30:39 |
| Source code size: | 207 bytes / 6 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 572 / 613 |
| Version history: | 1 change(s) |
| Referenced in: | #1006654 - Standard functions list 2 (LIVE, continuation of #761) #1035778 - shortenToMaxLines - actually uses one more line for the ... |