/** possibly improvable */ public static String winQuote(String text) { if (text == null) return null; return "\"" + text .replace("\\", "\\\\") .replace("\"", "\\\"") .replace("\n", "\\n") .replace("\r", "\\r") + "\""; } static S winQuote(File f) { ret winQuote(f.getAbsolutePath()); }
download show line numbers debug dex old transpilations
Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, onxytkatvevr, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
| Snippet ID: | #1000830 |
| Snippet name: | winQuote function |
| Eternal ID of this version: | #1000830/2 |
| Text MD5: | 759c7cfd5c1512138190a2af3ec990cb |
| Author: | stefan |
| Category: | javax |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2017-06-30 22:51:27 |
| Source code size: | 321 bytes / 13 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 986 / 3046 |
| Version history: | 1 change(s) |
| Referenced in: | [show references] |