On Tuesday, September 7th, 2021 at 20:05, Jan Mercl <0xj...@gmail.com> wrote:
> On Tue, Sep 7, 2021 at 4:40 AM 'nadashin' via golang-nuts
>
> golang-nuts@googlegroups.com wrote:
>
> > Why is the function in Go compiler that interprets escape sequences not
>
On Tuesday, September 7th, 2021 at 08:55, Kurtis Rader
wrote:
> It does. See https://pkg.go.dev/strconv#Unquote. Try this hastily thrown
> together example:
>
> package main
>
> import (
> "fmt"
> "strconv"
> )
>
> func main() {
> e := strconv.Quote("a\033\r\nb")
> v, er
Why is the function in Go compiler that interprets escape sequences not
available in Go's standard library?
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to golang
> > fmt.Printf has a format specifier, %q that escapes string with Go
> > syntax and add quotes around the string. ( %#v also does it)
> >
> > But it doesn't have one that unescapes a string.
> >
> > I couldn't find any stdlib function that escape and unescape a string
> > following Go syntax. (and
> I couldn't find any stdlib function that escape and unescape a string
> following Go syntax. (and doesn't add quotes around the string)
If the stdlib doesn't have such functions I am proposing to add them.
--
You received this message because you are subscribed to the Google Groups
"golang-nu
fmt.Printf has a format specifier, %q that escapes string with Go
syntax and add quotes around the string. ( %#v also does it)
But it doesn't have one that unescapes a string.
I couldn't find any stdlib function that escape and unescape a string
following Go syntax. (and doesn't add quotes around
What is the purpose of having,
func NewReplacer(oldnew ...string) *Replacer
instead of,
func NewReplacer(oldnew ...[2]string) *Replacer
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To unsubscribe from this group and stop receiving email