equal
deleted
inserted
replaced
68 |
68 |
69 def sftp_string(str: String): String = { |
69 def sftp_string(str: String): String = { |
70 val special = "[]?*\\{} \"'" |
70 val special = "[]?*\\{} \"'" |
71 if (str.isEmpty) "\"\"" |
71 if (str.isEmpty) "\"\"" |
72 else if (str.exists(special.contains)) { |
72 else if (str.exists(special.contains)) { |
73 val res = new StringBuilder |
73 Library.string_builder() { res => |
74 for (c <- str) { |
74 for (c <- str) { |
75 if (special.contains(c)) res += '\\' |
75 if (special.contains(c)) res += '\\' |
76 res += c |
76 res += c |
77 } |
77 } |
78 res.toString() |
78 } |
79 } |
79 } |
80 else str |
80 else str |
81 } |
81 } |
82 |
82 |
83 |
83 |