treat data until EOF as new line and parse escape sequences

This commit is contained in:
Timon Ringwald
2022-05-06 10:51:52 +02:00
parent 9cb57b5aa0
commit 06648c9177
2 changed files with 36 additions and 6 deletions

14
esc_seq.go Normal file
View File

@ -0,0 +1,14 @@
package main
import "strings"
var EscSeqReplacer = strings.NewReplacer(
`\\`, `\`,
`\n`, "\n",
`\t`, "\t",
`\f`, "\f",
`\r`, "\r",
`\v`, "\v",
`\b`, "\b",
`\a`, "\a",
)