// Chapter 12 example: len counts bytes, and some characters use more than one. // Run with: go run exercises/12/03-bytes.go package main import ( "fmt" "unicode/utf8" ) func main() { fmt.Println(len("e")) // 1 fmt.Println(len("é")) // 2 word := "café" fmt.Println(len(word)) // 5 fmt.Println(utf8.RuneCountInString(word)) // 4 }