EscapeQuotes replaces any " with \"
(str string)
| 223 | |
| 224 | // EscapeQuotes replaces any " with \" |
| 225 | func EscapeQuotes(str string) string { |
| 226 | return strings.ReplaceAll(str, `"`, `\"`) |
| 227 | } |
| 228 | |
| 229 | // AddQuotes surrounds given string with quotes, |
| 230 | // also escaping any contained quotes |