...

/

Puzzle 15 Explanation: Length of Each Variable

Puzzle 15 Explanation: Length of Each Variable

Learn about a pitfall related to UTF-8 encoding.

We'll cover the following...

Try it yourself

Try executing the code below to see the result.

Press + to interact
package main
import (
"fmt"
)
func main() {
city1, city2 := "Krakow", "Kraków"
fmt.Println(city1 == city2)
}

Explanation

In the code above, do the two strings look similar? Yes. However, if we print the length ...

Access this course and 1400+ top-rated courses and projects.