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

9
LINES

< > BotCompany Repo | #1020284 // bashQuote2 - don't use quotes, just use backslashes (dev.)

JavaX fragment (include)

1  
static String bashQuote2(String text) {
2  
  if (text == null) null;
3  
  return text
4  
    .replace(" ", "\\ ");
5  
}
6  
7  
static String bashQuote2(File f) {
8  
  ret bashQuote2(f.getAbsolutePath());
9  
}

Author comment

Began life as a copy of #1000832

download  show line numbers  debug dex  old transpilations   

Travelled to 8 computer(s): bhatertpkbcr, cfunsshuasjs, gwrvuhgaqvyk, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1020284
Snippet name: bashQuote2 - don't use quotes, just use backslashes (dev.)
Eternal ID of this version: #1020284/4
Text MD5: a8b622cf8d03c469b336c335d5fe6742
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-12-12 16:22:57
Source code size: 192 bytes / 9 lines
Pitched / IR pitched: No / No
Views / Downloads: 285 / 318
Version history: 3 change(s)
Referenced in: [show references]