// host is either a host name or "hostname:1234" // result is "hostname:456" sS addPortToHost(S host, int port) { ret beforeColonOrAll(host) + ":" + port; }
download show line numbers debug dex old transpilations
Travelled to 3 computer(s): bhatertpkbcr, mowyntqkapby, mqqgnosmbjvj
No comments. add comment
Snippet ID: | #1032713 |
Snippet name: | addPortToHost |
Eternal ID of this version: | #1032713/1 |
Text MD5: | af4d59afa6dfac03790713e0c4b6e319 |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2021-10-03 17:39:00 |
Source code size: | 162 bytes / 5 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 147 / 177 |
Referenced in: | #1006654 - Standard functions list 2 (LIVE, continuation of #761) #1032727 - addPortToHost_drop80 |