golang.org/toolchain@v0.0.1-go1.9rc2.windows-amd64/blog/content/strings/range.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 nihongo = "日本語" 13 for index, runeValue := range nihongo { 14 fmt.Printf("%#U starts at byte position %d\n", runeValue, index) 15 } 16 }