Libraryless. Click here for Pure Java version (2595L/16K).
1 | sS shorten_nullOnNull(CharSequence s) { ret shorten_nullOnNull(s, shorten_default); } |
2 | |
3 | sS shorten_nullOnNull(CharSequence s, int max) { |
4 | ret shorten_nullOnNull(s, max, "..."); |
5 | } |
6 | |
7 | sS shorten_nullOnNull(CharSequence s, int max, S shortener) { |
8 | if (s == null) null; |
9 | ret shorten(s, max, shortener); |
10 | } |
11 | |
12 | sS shorten_nullOnNull(int max, CharSequence s) { ret shorten_nullOnNull(s, max); } |
Began life as a copy of #1000644
download show line numbers debug dex old transpilations
Travelled to 4 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, vouqrxazstgt
No comments. add comment
Snippet ID: | #1030134 |
Snippet name: | shorten_nullOnNull |
Eternal ID of this version: | #1030134/1 |
Text MD5: | 0e5d6da4ee06a21b288019e53a3bff72 |
Transpilation MD5: | 70f6719a43d4f77519a767dfd7a0cd63 |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2020-11-11 11:07:55 |
Source code size: | 395 bytes / 12 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 211 / 313 |
Referenced in: | [show references] |