1 | sS appendWithNewLine(S a, S b) {
|
2 | if (empty(b)) ret a; |
3 | if (empty(a)) ret b; |
4 | ret addSuffix(a, "\n") + b; |
5 | } |
Began life as a copy of #1014093
download show line numbers debug dex old transpilations
Travelled to 7 computer(s): bhatertpkbcr, cfunsshuasjs, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt
No comments. add comment
| Snippet ID: | #1021832 |
| Snippet name: | appendWithNewLine - inserts new line between a and b if they are both not empty |
| Eternal ID of this version: | #1021832/3 |
| Text MD5: | b0ec614a352b3694d759898bc59eb0d1 |
| Author: | stefan |
| Category: | javax |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2019-03-01 11:45:59 |
| Source code size: | 114 bytes / 5 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 613 / 647 |
| Version history: | 2 change(s) |
| Referenced in: | [show references] |