github.com/graybobo/golang.org-package-offline-cache@v0.0.0-20200626051047-6608995c132f/x/blog/content/strings/utf8.go (about) 1 // +build OMIT 2 3 // Copyright 2013 The Go Authors. All rights reserved. 4 // Use of this source code is governed by a BSD-style 5 // license that can be found in the LICENSE file. 6 7 package main 8 9 import "fmt" 10 11 func main() { 12 const placeOfInterest = `⌘` 13 14 fmt.Printf("plain string: ") 15 fmt.Printf("%s", placeOfInterest) 16 fmt.Printf("\n") 17 18 fmt.Printf("quoted string: ") 19 fmt.Printf("%+q", placeOfInterest) 20 fmt.Printf("\n") 21 22 fmt.Printf("hex bytes: ") 23 for i := 0; i < len(placeOfInterest); i++ { 24 fmt.Printf("%x ", placeOfInterest[i]) 25 } 26 fmt.Printf("\n") 27 }