Libraryless. Click here for Pure Java version (8204L/46K).
static S platformQuoteOpt(S s) { ret empty(s) || containsUnsafePlatformCmdLineChar(s) ? platformQuote(s) : s; } static S platformQuoteOpt(File f) { ret platformQuoteOpt(f2s(f)); } sS platformQuoteOpt(O o) { if (o cast File) ret platformQuoteOpt(o); ret platformQuoteOpt(strOrEmpty(o)); }
Began life as a copy of #1005009
download show line numbers debug dex old transpilations
Travelled to 15 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt, xrpafgyirdlv
No comments. add comment
| Snippet ID: | #1016316 |
| Snippet name: | platformQuoteOpt - quote stuff for platform-specific command line if necessary |
| Eternal ID of this version: | #1016316/4 |
| Text MD5: | 46157d2e78534d41ec9b33044caa9f4d |
| Transpilation MD5: | 89cab4b61269fd172f8c247fb0f9e056 |
| Author: | stefan |
| Category: | javax |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2022-05-22 18:24:59 |
| Source code size: | 308 bytes / 12 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 689 / 813 |
| Version history: | 3 change(s) |
| Referenced in: | #1006654 - Standard functions list 2 (LIVE, continuation of #761) #1031837 - bashQuoteOpt #1032382 - safePlatformQuote - quote stuff for platform-specific command line. use single quotes on Linux so no $ variables are interpreted |