Create a main.go file and enter the following code:
package main
import "fmt"
func main() {
name := "carl"
fmt.Println(len(name))
}
2. Run the code
```sh
go run main.go
Results in ...
NOTE: The return value is 4 as expected if you count the letters of the string "carl". But recognize 2 things: 1. The len(string) function only works on English strings. A foreign or non-utf8 sequence of characters will not return a count. 2. The count IS NOT the number of characters but in fact the byte count for the string.
Example 1: len(string)
import "fmt"
func main() { name := "carl" fmt.Println(len(name)) }
Results in ...