Transpiled version (83L) is out of date.
1 | static S pad(O s, int l) {
|
2 | ret pad(s, l, ' '); |
3 | } |
4 | |
5 | static S pad(O s, int l, char c) {
|
6 | S _s = str(s); |
7 | if (lengthOfString(_s) >= l) ret _s; |
8 | ret rep(c, l-lengthOfString(_s)) + _s; |
9 | } |
10 | |
11 | static S pad(int l, O s) { |
12 | ret pad(s, l); |
13 | } |
Began life as a copy of #1002634
download show line numbers debug dex old transpilations
Travelled to 16 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, lpdgvwnxivlt, mowyntqkapby, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt, whxojlpjdney
No comments. add comment
| Snippet ID: | #1009103 |
| Snippet name: | pad - pad (move contents to the right) |
| Eternal ID of this version: | #1009103/6 |
| Text MD5: | 6078a0ca12273851577af5857f014bd2 |
| Author: | stefan |
| Category: | javax |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2021-05-20 22:01:19 |
| Source code size: | 240 bytes / 13 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 819 / 1005 |
| Version history: | 5 change(s) |
| Referenced in: | [show references] |