Golang strconv.Quote() function example

package strconv

Golang strconv.Quote() function usage example

 package main

 import (
  "fmt"
  "strconv"
 )

 func main() {
  s := "this"
  qs := strconv.Quote(s)

  fmt.Println("A quoted string looks like :", qs)

 }

Reference :

http://golang.org/pkg/strconv/#Quote

Advertisement