/** possibly improvable */ static String bashQuote(String text) { if (text == null) return null; return "\"" + text .replace("\\", "\\\\") .replace("\"", "\\\"") .replace("\n", "\\n") .replace("\r", "\\r") + "\""; } static String bashQuote(File f) { ret bashQuote(f.getAbsolutePath()); }
Began life as a copy of #1000830
download show line numbers debug dex old transpilations
Travelled to 15 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, onxytkatvevr, pyentgdyhuwx, pzhvpgtvlbxg, sawdedvomwva, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
| Snippet ID: | #1000832 |
| Snippet name: | bashQuote function |
| Eternal ID of this version: | #1000832/1 |
| Text MD5: | 9ca83e09420eded8bc9329be28c31872 |
| Author: | stefan |
| Category: | javax |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2016-08-07 17:39:01 |
| Source code size: | 322 bytes / 13 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 1248 / 3511 |
| Referenced in: | [show references] |