From 8ed3e407ee725416e944ddaf0cf0fb3beefbe6fd Mon Sep 17 00:00:00 2001 From: milarin Date: Sun, 15 Jan 2023 20:53:51 +0100 Subject: [PATCH] escape sequence replacer implemented --- esc_seq.go | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 esc_seq.go diff --git a/esc_seq.go b/esc_seq.go new file mode 100644 index 0000000..0217d2e --- /dev/null +++ b/esc_seq.go @@ -0,0 +1,14 @@ +package logic + +import "strings" + +var EscSeqReplacer = strings.NewReplacer( + `\\`, `\`, + `\n`, "\n", + `\t`, "\t", + `\f`, "\f", + `\r`, "\r", + `\v`, "\v", + `\b`, "\b", + `\a`, "\a", +)