Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

12
LINES

< > BotCompany Repo | #1016316 // platformQuoteOpt - quote stuff for platform-specific command line if necessary

JavaX fragment (include) [tags: use-pretranspiled]

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));
}

Author comment

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: 413 / 491
Version history: 3 change(s)
Referenced in: [show references]